Spaces:
Sleeping
Sleeping
Initial Draft
Browse files- Dockerfile +5 -8
Dockerfile
CHANGED
|
@@ -1,15 +1,12 @@
|
|
| 1 |
# Node base image
|
| 2 |
FROM node:16
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
# Switch to the "user" user
|
| 8 |
-
USER user
|
| 9 |
|
| 10 |
# Set home to the user's home directory
|
| 11 |
-
ENV HOME=/home/
|
| 12 |
-
PATH=/home/
|
| 13 |
|
| 14 |
# Set the working directory to the user's home directory
|
| 15 |
WORKDIR $HOME/app
|
|
@@ -18,7 +15,7 @@ WORKDIR $HOME/app
|
|
| 18 |
ADD . $HOME/app
|
| 19 |
|
| 20 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 21 |
-
COPY --chown=
|
| 22 |
|
| 23 |
# Loading Dependencies
|
| 24 |
RUN npm install
|
|
|
|
| 1 |
# Node base image
|
| 2 |
FROM node:16
|
| 3 |
|
| 4 |
+
# Switch to the "node" user
|
| 5 |
+
USER node
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# Set home to the user's home directory
|
| 8 |
+
ENV HOME=/home/node \
|
| 9 |
+
PATH=/home/node/.local/bin:$PATH
|
| 10 |
|
| 11 |
# Set the working directory to the user's home directory
|
| 12 |
WORKDIR $HOME/app
|
|
|
|
| 15 |
ADD . $HOME/app
|
| 16 |
|
| 17 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 18 |
+
COPY --chown=node . $HOME/app
|
| 19 |
|
| 20 |
# Loading Dependencies
|
| 21 |
RUN npm install
|