reduce docker image size (#10506)

This commit is contained in:
Torsten Hain 2020-10-19 19:29:20 +02:00 committed by GitHub
parent bbe23c652c
commit c3cb0e8b02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -45,15 +45,15 @@ LABEL maintainer="Apache Druid Developers <dev@druid.apache.org>"
COPY --from=busybox /bin/busybox /busybox/busybox
RUN ["/busybox/busybox", "--install", "/bin"]
COPY --from=builder /opt /opt
COPY distribution/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
USER druid
VOLUME /opt/druid/var
WORKDIR /opt/druid

View File

@ -45,15 +45,15 @@ LABEL maintainer="Apache Druid Developers <dev@druid.apache.org>"
COPY --from=busybox /bin/busybox /busybox/busybox
RUN ["/busybox/busybox", "--install", "/bin"]
COPY --from=builder /opt /opt
COPY distribution/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
USER druid
VOLUME /opt/druid/var
WORKDIR /opt/druid