From 1861ab66b044c07e8accb92a26f760bc17cbc3e1 Mon Sep 17 00:00:00 2001 From: knanao Date: Wed, 6 Jul 2022 11:03:52 +0900 Subject: [PATCH 1/2] Fix the image of firestore-emulator --- tool/firestore-emulator/Dockerfile | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/tool/firestore-emulator/Dockerfile b/tool/firestore-emulator/Dockerfile index b7abef1b3d..eee86074ca 100644 --- a/tool/firestore-emulator/Dockerfile +++ b/tool/firestore-emulator/Dockerfile @@ -1,19 +1,13 @@ -FROM openjdk:8-jre-alpine3.9 +ARG GOOGLE_CLOUD_SDK_VERSION=392.0.0-alpine -ARG GOOGLE_CLOUD_SDK_VERSION=392.0.0 +FROM google/cloud-sdk:$GOOGLE_CLOUD_SDK_VERSION -RUN apk add --no-cache \ - python3 \ - curl && \ - curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$GOOGLE_CLOUD_SDK_VERSION-linux-x86.tar.gz && \ - tar -C /usr/local -xvzf google-cloud-sdk-$GOOGLE_CLOUD_SDK_VERSION-linux-x86.tar.gz && \ - rm google-cloud-sdk-$GOOGLE_CLOUD_SDK_VERSION-linux-x86.tar.gz && \ - /usr/local/google-cloud-sdk/install.sh --quiet +RUN apk add --update --no-cache openjdk11-jre-headless -ENV PATH $PATH:/usr/local/google-cloud-sdk/bin +ENV FIRESTORE_PROJECT_ID "project" +RUN gcloud config set project $FIRESTORE_PROJECT_ID && gcloud components install cloud-firestore-emulator beta --quiet -RUN gcloud components install cloud-firestore-emulator +ENV PORT 8080 +EXPOSE "$PORT" -EXPOSE 8080 -ENTRYPOINT ["gcloud", "beta", "emulators", "firesotre", "start"] -CMD ["--host-port=0.0.0.0:8080"] +ENTRYPOINT gcloud beta emulators firestore start --host-port="0.0.0.0:${PORT}" From 5441c199ea236eeaad605c8b46ab870b2c1d0bbe Mon Sep 17 00:00:00 2001 From: knanao Date: Wed, 6 Jul 2022 11:30:56 +0900 Subject: [PATCH 2/2] Fix some points from review --- tool/firestore-emulator/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/firestore-emulator/Dockerfile b/tool/firestore-emulator/Dockerfile index eee86074ca..f3741a9883 100644 --- a/tool/firestore-emulator/Dockerfile +++ b/tool/firestore-emulator/Dockerfile @@ -4,7 +4,7 @@ FROM google/cloud-sdk:$GOOGLE_CLOUD_SDK_VERSION RUN apk add --update --no-cache openjdk11-jre-headless -ENV FIRESTORE_PROJECT_ID "project" +ENV FIRESTORE_PROJECT_ID "pipecd-test" RUN gcloud config set project $FIRESTORE_PROJECT_ID && gcloud components install cloud-firestore-emulator beta --quiet ENV PORT 8080