Skip to content

Commit

Permalink
ioc: use non-interactive install for build-stage.
Browse files Browse the repository at this point in the history
This is required to use BUILD_PACKAGES to install any package. No
recommended package option has also been enabled to avoid unused
packages in the resulting IOC image. Lines have been broken to make it
easier to read and maintain this step.
  • Loading branch information
henriquesimoes committed Oct 16, 2023
1 parent 4ba9c44 commit 6ed026b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ FROM build-image AS build-stage
ARG REPONAME
ARG BUILD_PACKAGES

RUN if [ -n "$BUILD_PACKAGES" ]; then apt update && apt install $BUILD_PACKAGES; fi
RUN if [ -n "$BUILD_PACKAGES" ]; then \
apt update && \
apt install -y --no-install-recommends $BUILD_PACKAGES; \
fi

WORKDIR /opt/${REPONAME}

Expand Down

0 comments on commit 6ed026b

Please sign in to comment.