From 4ded31957e9d0e740d108bc4d0ca5abbb865f3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20L=C3=A9aut=C3=A9?= Date: Tue, 27 Apr 2021 16:25:16 -0700 Subject: [PATCH] fix docker image build failure caused by #10506 --- distribution/docker/Dockerfile | 7 ++----- distribution/docker/Dockerfile.java11 | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/distribution/docker/Dockerfile b/distribution/docker/Dockerfile index 6e110ce774c7..133677f08b46 100644 --- a/distribution/docker/Dockerfile +++ b/distribution/docker/Dockerfile @@ -35,17 +35,14 @@ LABEL maintainer="Apache Druid Developers " COPY --from=busybox /bin/busybox /busybox/busybox RUN ["/busybox/busybox", "--install", "/bin"] -COPY --from=extractor /opt /opt -COPY ./docker/druid.sh /druid.sh - RUN addgroup -S -g 1000 druid \ && adduser -S -u 1000 -D -H -h /opt/druid -s /bin/sh -g '' -G druid druid \ && mkdir -p /opt/druid/var \ && chown -R druid:druid /opt \ && chmod 775 /opt/druid/var -COPY --chown=druid:druid --from=builder /opt /opt -COPY distribution/docker/druid.sh /druid.sh +COPY --chown=druid:druid --from=extractor /opt /opt +COPY ./docker/druid.sh /druid.sh USER druid VOLUME /opt/druid/var diff --git a/distribution/docker/Dockerfile.java11 b/distribution/docker/Dockerfile.java11 index d9af25074db3..4d92997f154b 100644 --- a/distribution/docker/Dockerfile.java11 +++ b/distribution/docker/Dockerfile.java11 @@ -35,17 +35,14 @@ LABEL maintainer="Apache Druid Developers " COPY --from=busybox /bin/busybox /busybox/busybox RUN ["/busybox/busybox", "--install", "/bin"] -COPY --from=extractor /opt /opt -COPY ./docker/druid.sh /druid.sh - RUN addgroup -S -g 1000 druid \ && adduser -S -u 1000 -D -H -h /opt/druid -s /bin/sh -g '' -G druid druid \ && mkdir -p /opt/druid/var \ && chown -R druid:druid /opt \ && chmod 775 /opt/druid/var -COPY --chown=druid:druid --from=builder /opt /opt -COPY distribution/docker/druid.sh /druid.sh +COPY --chown=druid:druid --from=extractor /opt /opt +COPY ./docker/druid.sh /druid.sh USER druid VOLUME /opt/druid/var