Skip to content

Commit

Permalink
fix(docker): reduce docker image size
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Sep 15, 2023
1 parent e85f697 commit 0febbee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ ARG KESTRA_PLUGINS=""
ARG APT_PACKAGES=""

WORKDIR /app
COPY docker /

RUN groupadd kestra && \
useradd -m -g kestra kestra && \

COPY --chown=kestra:kestra docker /

RUN apt-get update -y && \
apt-get upgrade -y && \
if [ -n "${APT_PACKAGES}" ]; then apt-get install -y --no-install-recommends ${APT_PACKAGES}; fi && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/* && \
if [ -n "${KESTRA_PLUGINS}" ]; then /app/kestra plugins install ${KESTRA_PLUGINS} && rm -rf /tmp/*; fi && \
groupadd kestra && \
useradd -m -g kestra kestra && \
chown -R kestra:kestra /app

USER kestra
Expand Down

0 comments on commit 0febbee

Please sign in to comment.