Skip to content

Commit

Permalink
docker: switch base image to cgr.dev/chainguard/jdk:latest
Browse files Browse the repository at this point in the history
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
  • Loading branch information
zchee committed Jun 15, 2024
1 parent 3abb6c2 commit 9f4da34
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
# syntax=docker/dockerfile-upstream:master-labs

FROM debian:bullseye-slim AS cloud-firestore-emulator
FROM --platform=$BUILDPLATFORM cgr.dev/chainguard/jdk:latest AS cloud-pubsub-emulator
ARG TARGETPLATFORM

ARG FIRESTORE_EMULATOR_BUILD_NUMBER
LABEL org.opencontainers.image.authors "The containerz authors"
LABEL org.opencontainers.image.url "https://github.com/containerz-dev/cloud-firestore-emulator"
LABEL org.opencontainers.image.source "https://github.com/containerz-dev/cloud-firestore-emulator"
LABEL org.opencontainers.image.documentation "Cloud SDK less cloud firestore emulator container image"
LABEL org.opencontainers.image.base.name "debian:bullseye-slim"
LABEL org.opencontainers.image.version "${FIRESTORE_EMULATOR_BUILD_NUMBER}"
LABEL org.opencontainers.image.licenses "BSD-3-Clause"
LABEL org.opencontainers.image.authors="The containerz authors"
LABEL org.opencontainers.image.url="https://github.com/containerz-dev/cloud-firestore-emulator"
LABEL org.opencontainers.image.source="https://github.com/containerz-dev/cloud-firestore-emulator"
LABEL org.opencontainers.image.documentation="Cloud SDK less cloud firestore emulator container image"
LABEL org.opencontainers.image.base.name="cgr.dev/chainguard/jdk:latest"
LABEL org.opencontainers.image.version="${FIRESTORE_EMULATOR_BUILD_NUMBER}"
LABEL org.opencontainers.image.licenses="BSD-3-Clause"

ENV FIRESTORE_EMULATOR_URL="https://dl.google.com/dl/cloudsdk/channels/rapid/components/google-cloud-sdk-cloud-firestore-emulator-${FIRESTORE_EMULATOR_BUILD_NUMBER}.tar.gz"
RUN apt-get update && \
apt-get -y install \
curl \
bash \
openjdk-11-jre-headless && \
\
curl -sSL ${FIRESTORE_EMULATOR_URL} | tar xfz - --strip-components=1 -C /
ADD --chown=java:java ${FIRESTORE_EMULATOR_URL} /home/build
RUN tar xfz /home/build/google-cloud-sdk-cloud-firestore-emulator-${FIRESTORE_EMULATOR_BUILD_NUMBER}.tar.gz --strip-components=1 -C /home/build

EXPOSE 8080/tcp
ENTRYPOINT ["/cloud-firestore-emulator/cloud_firestore_emulator", "--host", "0.0.0.0"]
ENTRYPOINT ["/home/build/cloud-firestore-emulator/cloud_firestore_emulator", "--host=0.0.0.0", "--port=8080"]

0 comments on commit 9f4da34

Please sign in to comment.