Skip to content

Commit 2aef3df

Browse files
CCM-15866: Address Sonar Findings - Better Perms in Jekyll Container
1 parent da7d602 commit 2aef3df

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • src/jekyll-devcontainer/src/.devcontainer

src/jekyll-devcontainer/src/.devcontainer/Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,11 @@ LABEL org.opencontainers.image.source=https://github.com/NHSDigital/nhs-notify-r
33

44
COPY packages.txt packages.txt
55

6-
RUN apt-get update && xargs apt-get -y install < packages.txt
6+
USER root
7+
RUN apt-get update \
8+
&& xargs apt-get -y install --no-install-recommends < packages.txt \
9+
&& apt-get clean \
10+
&& rm -rf /var/lib/apt/lists/*
11+
12+
# Run the container as a non-root user by default.
13+
USER vscode

0 commit comments

Comments
 (0)