Skip to content

Commit 35f5121

Browse files
authored
Update Dockerfile for time
podman and SELinux
1 parent 6a30baa commit 35f5121

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/time/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ENV UV_LINK_MODE=copy
1212

1313
# Install the project's dependencies using the lockfile and settings
1414
RUN --mount=type=cache,target=/root/.cache/uv \
15-
--mount=type=bind,source=uv.lock,target=uv.lock \
16-
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
15+
--mount=type=bind,source=uv.lock,target=uv.lock,Z \
16+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml,Z \
1717
uv sync --frozen --no-install-project --no-dev --no-editable
1818

1919
# Then, add the rest of the project source code and install it
@@ -27,6 +27,9 @@ FROM python:3.12-slim-bookworm
2727
WORKDIR /app
2828

2929
COPY --from=uv /root/.local /root/.local
30+
31+
# User app does not exist in base image (chown)
32+
RUN useradd -rUM -s /usr/sbin/nologin app
3033
COPY --from=uv --chown=app:app /app/.venv /app/.venv
3134

3235
# Place executables in the environment at the front of the path

0 commit comments

Comments
 (0)