Skip to content

Commit ed3e494

Browse files
committed
fix: add forest user to Dockerfile for improved permissions handling
Signed-off-by: Alexander Dobrodey <[email protected]>
1 parent db244e2 commit ed3e494

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,22 @@ repos:
3535
hooks:
3636
- id: shellcheck
3737
files: \.sh$
38+
39+
- repo: https://github.com/igorshubovych/markdownlint-cli
40+
rev: v0.45.0
41+
hooks:
42+
- id: markdownlint
43+
args: ['--fix']
44+
45+
- repo: https://github.com/JangasCodingplace/commit-prefix-pre-commit
46+
rev: v0.0.3-beta
47+
hooks:
48+
- id: commit-prefix
49+
stages: [commit-msg]
50+
51+
- repo: https://github.com/compilerla/conventional-pre-commit
52+
rev: v4.2.0
53+
hooks:
54+
- id: conventional-pre-commit
55+
stages: [commit-msg]
56+
args: []

images/fil-snapshots-archive/Dockerfile-light

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ RUN forest -V \
2626
&& jq -V \
2727
&& python3 -V
2828

29+
RUN groupadd --gid 1001 forest \
30+
&& useradd --uid 1001 --gid 1001 --create-home --shell /bin/bash forest
31+
32+
USER forest
2933
ENTRYPOINT ["/bin/bash"]

images/fil-snapshots-archive/Dockerfile-make

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN apt-get update \
77
build-essential \
88
clang-14 \
99
curl \
10-
git \
10+
git \
1111
ca-certificates \
1212
&& update-ca-certificates
1313
ENV CC=clang-14 CXX=clang++-14
@@ -93,6 +93,10 @@ RUN forest -V \
9393
&& forest-cli -V \
9494
&& forest-tool -V \
9595
&& jq -V \
96-
&& python3 -V
96+
&& python3 -V \
9797

98+
RUN groupadd --gid 1001 forest \
99+
&& useradd --uid 1001 --gid 1001 --create-home --shell /bin/bash forest
100+
101+
USER forest
98102
ENTRYPOINT ["/bin/bash"]

0 commit comments

Comments
 (0)