Spaces:
Runtime error
Runtime error
Commit
·
13d62a7
1
Parent(s):
06a0d8d
which npm
Browse files- Dockerfile +10 -7
Dockerfile
CHANGED
|
@@ -4,15 +4,18 @@ FROM python:3.9
|
|
| 4 |
ENV PYTHONUNBUFFERED 1
|
| 5 |
RUN apt-get update && apt-get install nodejs -y
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
# Set the working directory to the user's home directory
|
| 18 |
WORKDIR $HOME/app
|
|
|
|
| 4 |
ENV PYTHONUNBUFFERED 1
|
| 5 |
RUN apt-get update && apt-get install nodejs -y
|
| 6 |
|
| 7 |
+
# print npm path
|
| 8 |
+
RUN which npm
|
| 9 |
|
| 10 |
+
Set up a new user named "user" with user ID 1000
|
| 11 |
+
RUN useradd -m -u 1000 user
|
| 12 |
|
| 13 |
+
# Switch to the "user" user
|
| 14 |
+
USER user
|
| 15 |
+
|
| 16 |
+
# Set home to the user's home directory
|
| 17 |
+
ENV HOME=/home/user \
|
| 18 |
+
PATH=/home/user/.local/bin:$PATH
|
| 19 |
|
| 20 |
# Set the working directory to the user's home directory
|
| 21 |
WORKDIR $HOME/app
|