Skip to content

Commit

Permalink
merge apt-get commands to create less layers
Browse files Browse the repository at this point in the history
  • Loading branch information
rfratto committed Dec 7, 2020
1 parent 2c6de22 commit 89b8486
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions cmd/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ FROM debian:buster-slim
# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
RUN echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t buster-backports -qy libsystemd-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN apt-get update && \
apt-get install -qy \
tzdata ca-certificates && \
apt-get install -qy tzdata ca-certificates && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=build /src/agent/cmd/agent/agent /bin/agent
Expand Down
6 changes: 1 addition & 5 deletions cmd/agent/Dockerfile.buildx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ FROM debian:buster-slim
# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
RUN echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t buster-backports -qy libsystemd-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN apt-get update && \
apt-get install -qy \
tzdata ca-certificates libsystemd-dev && \
apt-get install -qy tzdata ca-certificates libsystemd-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=build /src/agent/cmd/agent/agent /bin/agent
Expand Down

0 comments on commit 89b8486

Please sign in to comment.