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 13, 2024
1 parent cbe76b1 commit 48edfd6
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
# syntax=docker/dockerfile-upstream:1-labs
# syntax=docker/dockerfile-upstream:master-labs

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

LABEL org.opencontainers.image.authors "The containerz authors"
LABEL org.opencontainers.image.url "https://github.com/containerz-dev/cloud-pubsub-emulator"
LABEL org.opencontainers.image.source "https://github.com/containerz-dev/cloud-pubsub-emulator/Dockerfile"
LABEL org.opencontainers.image.documentation "Cloud SDK less Cloud Pub/Sub emulator container"
LABEL org.opencontainers.image.base.name "debian:bullseye-slim"
LABEL org.opencontainers.image.version "${PUBSUB_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-pubsub-emulator"
LABEL org.opencontainers.image.source="https://github.com/containerz-dev/cloud-pubsub-emulator/Dockerfile"
LABEL org.opencontainers.image.documentation="Cloud SDK less Cloud Pub/Sub emulator container"
LABEL org.opencontainers.image.base.name="cgr.dev/chainguard/jdk:latest"
LABEL org.opencontainers.image.version="${PUBSUB_EMULATOR_BUILD_NUMBER}"
LABEL org.opencontainers.image.licenses="BSD-3-Clause"

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

EXPOSE 8085/tcp
ENTRYPOINT ["/pubsub-emulator/bin/cloud-pubsub-emulator"]
ENTRYPOINT ["/home/build/pubsub-emulator/bin/cloud-pubsub-emulator", "--host=0.0.0.0", "--port=8085"]

0 comments on commit 48edfd6

Please sign in to comment.