Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +12 -14
Dockerfile
CHANGED
@@ -48,6 +48,8 @@ RUN apk add --no-cache --virtual .build-deps \
|
|
48 |
sudo \
|
49 |
gcc \
|
50 |
libc-dev \
|
|
|
|
|
51 |
mpc1-dev \
|
52 |
python3-dev && \
|
53 |
apk add --no-cache \
|
@@ -82,21 +84,17 @@ RUN apk add --no-cache --virtual .build-deps \
|
|
82 |
# USER root
|
83 |
# # RUN adduser -S -D -u 0 admin
|
84 |
|
85 |
-
# #
|
86 |
-
#
|
87 |
-
|
88 |
-
|
89 |
-
#
|
90 |
-
|
|
|
|
|
91 |
# USER admin
|
92 |
-
|
93 |
-
|
94 |
-
# RUN su - admin
|
95 |
-
RUN adduser -G wheel -D root
|
96 |
-
RUN adduser -G wheel -D node
|
97 |
-
RUN echo "permit nopass :wheel as root" > /etc/doas.d/doas.conf
|
98 |
-
USER node
|
99 |
-
RUN doas apk update
|
100 |
# Set the working directory (good practice)
|
101 |
RUN ngrok config add-authtoken $NGROK_AUTHTOKEN
|
102 |
|
|
|
48 |
sudo \
|
49 |
gcc \
|
50 |
libc-dev \
|
51 |
+
shadow \
|
52 |
+
busybox-suid \
|
53 |
mpc1-dev \
|
54 |
python3-dev && \
|
55 |
apk add --no-cache \
|
|
|
84 |
# USER root
|
85 |
# # RUN adduser -S -D -u 0 admin
|
86 |
|
87 |
+
# # (Optional) Add the admin user to the root group for completeness
|
88 |
+
# RUN addgroup admin root
|
89 |
+
RUN useradd -m -s /bin/bash admin
|
90 |
+
RUN passwd -d admin
|
91 |
+
# RUN admin ALL=ALL NOPASSWD: ALL
|
92 |
+
RUN usermod -aG root admin
|
93 |
+
USER admin
|
94 |
+
# # Switch to the admin user (now root-equivalent)
|
95 |
# USER admin
|
96 |
+
RUN su - admin
|
97 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
# Set the working directory (good practice)
|
99 |
RUN ngrok config add-authtoken $NGROK_AUTHTOKEN
|
100 |
|