Spaces:
Sleeping
Sleeping
Commit
•
c758574
1
Parent(s):
0b97439
switch to root to add permissions
Browse files- Dockerfile +8 -1
Dockerfile
CHANGED
@@ -2,7 +2,7 @@ FROM node:slim
|
|
2 |
|
3 |
RUN apt-get update && apt-get install -y python3 python3-pip python3-venv ffmpeg libsm6 libxext6 pkg-config libpixman-1-dev libcairo2-dev libpango1.0-dev libgif-dev
|
4 |
|
5 |
-
RUN useradd -m -u
|
6 |
USER user
|
7 |
ENV HOME=/home/user \
|
8 |
PATH=/home/user/.local/bin:$PATH
|
@@ -22,4 +22,11 @@ RUN yarn install && yarn build
|
|
22 |
|
23 |
WORKDIR $HOME/app
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
CMD ["/home/user/app/.venv/bin/python3", "main.py"]
|
|
|
2 |
|
3 |
RUN apt-get update && apt-get install -y python3 python3-pip python3-venv ffmpeg libsm6 libxext6 pkg-config libpixman-1-dev libcairo2-dev libpango1.0-dev libgif-dev
|
4 |
|
5 |
+
RUN useradd -m -u 1001 user
|
6 |
USER user
|
7 |
ENV HOME=/home/user \
|
8 |
PATH=/home/user/.local/bin:$PATH
|
|
|
22 |
|
23 |
WORKDIR $HOME/app
|
24 |
|
25 |
+
# need this because I cannot create user 1000 because it's
|
26 |
+
# already taken by node, and user 1001 does not seem to have
|
27 |
+
# permissions to write files
|
28 |
+
USER root
|
29 |
+
RUN chmod 777 $HOME/app
|
30 |
+
USER user
|
31 |
+
|
32 |
CMD ["/home/user/app/.venv/bin/python3", "main.py"]
|