Stéphane G commited on
Commit ·
92eb375
1
Parent(s): 0382ce9
add user with the right permissions
Browse files- Dockerfile +13 -1
Dockerfile
CHANGED
|
@@ -15,4 +15,16 @@ RUN chmod 777 /.cache
|
|
| 15 |
RUN mkdir -p checkout
|
| 16 |
RUN chmod 777 checkout
|
| 17 |
RUN mkdir .chroma
|
| 18 |
-
RUN chmod 777 .chroma
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
RUN mkdir -p checkout
|
| 16 |
RUN chmod 777 checkout
|
| 17 |
RUN mkdir .chroma
|
| 18 |
+
RUN chmod 777 .chroma
|
| 19 |
+
|
| 20 |
+
# Set up a new user named "user" with user ID 1000
|
| 21 |
+
RUN useradd -m -u 1000 user
|
| 22 |
+
# Switch to the "user" user
|
| 23 |
+
USER user
|
| 24 |
+
# Set home to the user's home directory
|
| 25 |
+
ENV HOME=/home/user \
|
| 26 |
+
PATH=/home/user/.local/bin:$PATH
|
| 27 |
+
# Set the working directory to the user's home directory
|
| 28 |
+
WORKDIR $HOME/app
|
| 29 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 30 |
+
COPY --chown=user . $HOME/app
|