mirror of https://github.com/apache/druid.git
reduce docker image size (#10506)
This commit is contained in:
parent
bbe23c652c
commit
c3cb0e8b02
|
@ -45,15 +45,15 @@ LABEL maintainer="Apache Druid Developers <dev@druid.apache.org>"
|
||||||
COPY --from=busybox /bin/busybox /busybox/busybox
|
COPY --from=busybox /bin/busybox /busybox/busybox
|
||||||
RUN ["/busybox/busybox", "--install", "/bin"]
|
RUN ["/busybox/busybox", "--install", "/bin"]
|
||||||
|
|
||||||
COPY --from=builder /opt /opt
|
|
||||||
COPY distribution/docker/druid.sh /druid.sh
|
|
||||||
|
|
||||||
RUN addgroup -S -g 1000 druid \
|
RUN addgroup -S -g 1000 druid \
|
||||||
&& adduser -S -u 1000 -D -H -h /opt/druid -s /bin/sh -g '' -G druid druid \
|
&& adduser -S -u 1000 -D -H -h /opt/druid -s /bin/sh -g '' -G druid druid \
|
||||||
&& mkdir -p /opt/druid/var \
|
&& mkdir -p /opt/druid/var \
|
||||||
&& chown -R druid:druid /opt \
|
&& chown -R druid:druid /opt \
|
||||||
&& chmod 775 /opt/druid/var
|
&& chmod 775 /opt/druid/var
|
||||||
|
|
||||||
|
COPY --chown=druid:druid --from=builder /opt /opt
|
||||||
|
COPY distribution/docker/druid.sh /druid.sh
|
||||||
|
|
||||||
USER druid
|
USER druid
|
||||||
VOLUME /opt/druid/var
|
VOLUME /opt/druid/var
|
||||||
WORKDIR /opt/druid
|
WORKDIR /opt/druid
|
||||||
|
|
|
@ -45,15 +45,15 @@ LABEL maintainer="Apache Druid Developers <dev@druid.apache.org>"
|
||||||
COPY --from=busybox /bin/busybox /busybox/busybox
|
COPY --from=busybox /bin/busybox /busybox/busybox
|
||||||
RUN ["/busybox/busybox", "--install", "/bin"]
|
RUN ["/busybox/busybox", "--install", "/bin"]
|
||||||
|
|
||||||
COPY --from=builder /opt /opt
|
|
||||||
COPY distribution/docker/druid.sh /druid.sh
|
|
||||||
|
|
||||||
RUN addgroup -S -g 1000 druid \
|
RUN addgroup -S -g 1000 druid \
|
||||||
&& adduser -S -u 1000 -D -H -h /opt/druid -s /bin/sh -g '' -G druid druid \
|
&& adduser -S -u 1000 -D -H -h /opt/druid -s /bin/sh -g '' -G druid druid \
|
||||||
&& mkdir -p /opt/druid/var \
|
&& mkdir -p /opt/druid/var \
|
||||||
&& chown -R druid:druid /opt \
|
&& chown -R druid:druid /opt \
|
||||||
&& chmod 775 /opt/druid/var
|
&& chmod 775 /opt/druid/var
|
||||||
|
|
||||||
|
COPY --chown=druid:druid --from=builder /opt /opt
|
||||||
|
COPY distribution/docker/druid.sh /druid.sh
|
||||||
|
|
||||||
USER druid
|
USER druid
|
||||||
VOLUME /opt/druid/var
|
VOLUME /opt/druid/var
|
||||||
WORKDIR /opt/druid
|
WORKDIR /opt/druid
|
||||||
|
|
Loading…
Reference in New Issue