Skip to content

Commit f598dd5

Browse files
author
virgo-o
committed
rootless docker container
Signed-off-by: virgo-o <[email protected]>
1 parent e33f80e commit f598dd5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ ARG VERSION
55
ARG CDX_PATH=/opt/cyclonedx-py
66
ARG CDX_VENV=${CDX_PATH}/venv
77

8+
RUN addgroup --system --gid 1000 cyclonedx \
9+
&& adduser --system --shell /bin/bash --uid 1000 --ingroup cyclonedx cyclonedx
10+
811
RUN mkdir -p "${CDX_PATH}"
912
RUN python -m venv --without-pip "${CDX_VENV}"
1013
ENV VIRTUAL_ENV=${CDX_VENV}
@@ -19,4 +22,5 @@ RUN pip --python "${CDX_VENV}" \
1922
"cyclonedx-bom==${VERSION}" --find-links "file://${CDX_PATH}/dist"
2023
RUN rm -rf ${CDX_PATH}/dist
2124

25+
USER cyclonedx
2226
ENTRYPOINT ["cyclonedx-py"]

0 commit comments

Comments
 (0)