From ad36a34fd77388a529fbb05b1877e521995ce6e2 Mon Sep 17 00:00:00 2001 From: Craig Peterson <192540+captncraig@users.noreply.github.com> Date: Fri, 21 Jun 2024 11:23:11 -0400 Subject: [PATCH 1/2] remove explicit chown step that made docker image bigger --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a57b8a9db6..9349ac2184 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,8 +44,8 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -COPY --from=build /src/alloy/build/alloy /bin/alloy -COPY example-config.alloy /etc/alloy/config.alloy +COPY --from=build --chown=$UID --chmod=770 /src/alloy/build/alloy /bin/alloy +COPY --chown=$UID example-config.alloy /etc/alloy/config.alloy # Create alloy user in container, but do not set it as default # @@ -53,8 +53,6 @@ COPY example-config.alloy /etc/alloy/config.alloy # undocumented feature; use at your own risk. RUN groupadd --gid $UID $USERNAME RUN useradd -m -u $UID -g $UID $USERNAME -RUN chown -R $USERNAME:$USERNAME /etc/alloy -RUN chown -R $USERNAME:$USERNAME /bin/alloy RUN mkdir -p /var/lib/alloy/data RUN chown -R $USERNAME:$USERNAME /var/lib/alloy From 98d7f21d66a5b3d9e0b437067f8ae67ac5f5efb9 Mon Sep 17 00:00:00 2001 From: Craig Peterson <192540+captncraig@users.noreply.github.com> Date: Fri, 21 Jun 2024 11:30:11 -0400 Subject: [PATCH 2/2] remove chmod --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9349ac2184..771384b34f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -COPY --from=build --chown=$UID --chmod=770 /src/alloy/build/alloy /bin/alloy +COPY --from=build --chown=$UID /src/alloy/build/alloy /bin/alloy COPY --chown=$UID example-config.alloy /etc/alloy/config.alloy # Create alloy user in container, but do not set it as default