Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the image of firestore-emulator #3796

Merged
merged 2 commits into from
Jul 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions tool/firestore-emulator/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 "pipecd-test"
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}"