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