Skip to content

Commit ec01409

Browse files
authored
fix: go back to using root user in Dockerfile (#423)
We have to do this because we have no active way to change permissions to $GITHUB_OUTPUT to a specific user when running the container Add trivy ignore to top of Dockerfile to pass linting Signed-off-by: jmeridth <[email protected]>
1 parent 395c687 commit ec01409

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Dockerfile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#checkov:skip=CKV_DOCKER_2
22
#checkov:skip=CKV_DOCKER_3
3+
#trivy:ignore:AVD-DS-0002
34
FROM python:3.13.7-slim@sha256:58c30f5bfaa718b5803a53393190b9c68bd517c44c6c94c1b6c8c172bcfad040
45
LABEL org.opencontainers.image.source https://github.com/github/evergreen
56

@@ -9,13 +10,7 @@ COPY requirements.txt *.py /action/workspace/
910
RUN python3 -m pip install --no-cache-dir -r requirements.txt \
1011
&& apt-get -y update \
1112
&& apt-get -y install --no-install-recommends git=1:2.47.3-0+deb13u1 \
12-
&& rm -rf /var/lib/apt/lists/* \
13-
&& addgroup --system appuser \
14-
&& adduser --system --ingroup appuser --home /action/workspace --disabled-login appuser \
15-
&& chown -R appuser:appuser /action/workspace
16-
17-
# Run the action as a non-root user
18-
USER appuser
13+
&& rm -rf /var/lib/apt/lists/*
1914

2015
# Add a simple healthcheck to satisfy container scanners
2116
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \

0 commit comments

Comments
 (0)