-
-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (20 loc) · 715 Bytes
/
Dockerfile
File metadata and controls
26 lines (20 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.14-slim
ARG VERSION
ARG CDX_PATH=/opt/cyclonedx-py
ARG CDX_VENV=${CDX_PATH}/venv
RUN addgroup --system --gid 1000 cyclonedx \
&& adduser --system --shell /bin/bash --uid 1000 --ingroup cyclonedx cyclonedx
RUN mkdir -p "${CDX_PATH}"
RUN python -m venv --without-pip "${CDX_VENV}"
ENV VIRTUAL_ENV=${CDX_VENV}
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
COPY ./dist ${CDX_PATH}/dist
RUN pip --python "${CDX_VENV}" \
install --no-cache-dir --no-input --progress-bar=off \
--verbose --debug \
--prefix "${CDX_VENV}" --require-virtualenv \
--compile \
"cyclonedx-bom==${VERSION}" --find-links "file://${CDX_PATH}/dist"
RUN rm -rf ${CDX_PATH}/dist
USER cyclonedx
ENTRYPOINT ["cyclonedx-py"]