File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ services:
25
25
restart : no
26
26
container_name : backend-build
27
27
command : cargo build --release
28
+ user : " ${UID:-1000}:${GID:-1000}"
28
29
working_dir : /app
29
30
volumes :
30
31
- ../backend:/app
@@ -35,6 +36,7 @@ services:
35
36
restart : always
36
37
container_name : backend
37
38
command : ./backend
39
+ user : " ${UID:-1000}:${GID:-1000}"
38
40
depends_on :
39
41
postgres :
40
42
condition : service_healthy
@@ -70,12 +72,16 @@ services:
70
72
restart : no
71
73
build :
72
74
dockerfile : wg-webclient-builder/Dockerfile
75
+ user : " ${UID:-1000}:${GID:-1000}"
73
76
volumes :
74
77
- ../wg-webclient:/build
75
78
76
79
frontend-build :
77
80
build :
78
81
dockerfile : frontend-build/Dockerfile
82
+ args :
83
+ USER_ID : ${USER_ID:-1000}
84
+ GROUP_ID : ${GROUP_ID:-1000}
79
85
restart : no
80
86
command :
81
87
- /bin/sh
@@ -87,6 +93,7 @@ services:
87
93
wg-webclient-builder :
88
94
condition : service_completed_successfully
89
95
working_dir : /build
96
+ user : " ${UID:-1000}:${GID:-1000}"
90
97
environment :
91
98
- IS_SEB=${IS_SEB}
92
99
volumes :
Original file line number Diff line number Diff line change 1
1
FROM rust:1-bookworm
2
2
3
- RUN apt update && apt install clang -y
4
- RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
3
+ RUN apt update && apt install -y clang && rm -rf /var/lib/apt/lists/*
4
+
5
+ ARG USER_ID=1000
6
+ ARG GROUP_ID=1000
7
+
8
+ RUN addgroup --gid ${GROUP_ID} builder && \
9
+ adduser --disabled-password --gecos "" \
10
+ --uid ${USER_ID} --ingroup builder \
11
+ --shell /bin/sh --home /home/builder --quiet builder
12
+
13
+ USER builder
14
+
15
+ RUN cargo install wasm-pack
16
+
5
17
WORKDIR /build
6
- CMD wasm-pack build
18
+ CMD [ " wasm-pack" , " build" ]
You can’t perform that action at this time.
0 commit comments