From 9f4da3486a9b7e08ceb42ffac710b27ed813bdec Mon Sep 17 00:00:00 2001 From: Koichi Shiraishi Date: Sat, 15 Jun 2024 19:01:42 +0900 Subject: [PATCH] docker: switch base image to cgr.dev/chainguard/jdk:latest Signed-off-by: Koichi Shiraishi --- Dockerfile | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4d2bfda..e946be8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]