Skip to content

Commit

Permalink
fix(Dockerfile): root and rootless
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime1907 committed Jul 19, 2023
1 parent 8376333 commit a622d02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ jobs:
include:
- os: ubuntu-20.04
context: python/3.10-slim
target: ""
target: root
suffix: ""
- os: ubuntu-20.04
context: python/3.10-slim
target: rootless
suffix: -rootless

permissions:
contents: read
Expand All @@ -67,7 +69,7 @@ jobs:
flavor: |
latest=auto
prefix=
suffix=${{ matrix.target != '' || format('-{0}', matrix.target) }}
suffix=${{ matrix.suffix }}
- name: Build Docker image
uses: docker/[email protected]
Expand Down
5 changes: 3 additions & 2 deletions python/3.10-slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.10-slim as base
# syntax = docker/dockerfile:1.4
FROM python:3.10-slim as root

ARG SOURCEKNIGHT_VERSION

Expand All @@ -14,7 +15,7 @@ ENTRYPOINT ["/entrypoint.sh"]

CMD ["--help"]

FROM base as rootless
FROM root as rootless
RUN groupadd -g 1000 rootless && \
useradd -r -u 1000 -g rootless rootless

Expand Down

0 comments on commit a622d02

Please sign in to comment.