acarvalhofaktion commited on
Commit
38af30c
1 Parent(s): db6f069

add user permission to write files

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -1
Dockerfile CHANGED
@@ -1,7 +1,15 @@
1
  # syntax=docker/dockerfile:1
2
  FROM python:3.11 AS base_image
3
 
4
- WORKDIR /app
 
 
 
 
 
 
 
 
5
  # RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts
6
  # RUN --mount=type=ssh pip install -e git+ssh://git@bitbucket.org/faktionml/autotrain-advanced.git#egg=autotrain-advanced
7
  RUN pip install --upgrade pip
 
1
  # syntax=docker/dockerfile:1
2
  FROM python:3.11 AS base_image
3
 
4
+ # allow user to write files
5
+ RUN useradd -m -u 1000 user
6
+ USER user
7
+ ENV HOME=/home/user \
8
+ PATH=/home/user/.local/bin:$PATH
9
+
10
+ WORKDIR $HOME/app
11
+
12
+ COPY --chown=user . $HOME/app
13
  # RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts
14
  # RUN --mount=type=ssh pip install -e git+ssh://git@bitbucket.org/faktionml/autotrain-advanced.git#egg=autotrain-advanced
15
  RUN pip install --upgrade pip