hujameson commited on
Commit
b1cfb54
·
verified ·
1 Parent(s): 4f1cbd2

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -14,24 +14,24 @@ COPY requirements.txt .
14
  # RUN python -m pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
15
  RUN python -m pip install -r requirements.txt
16
 
17
- RUN adduser -u 5678 --disabled-password --gecos "" appuser
18
- USER appuser
19
 
20
  WORKDIR /app
21
  COPY . /app
22
 
 
 
 
 
 
 
23
  RUN mkdir -p /app/hub
24
  RUN chmod 777 /app
25
- RUN chown -R appuser /app
26
-
27
 
28
  RUN chmod 777 /app/hub
29
  # RUN chown appuser /app/hub
30
 
31
- # Creates a non-root user with an explicit UID and adds permission to access the /app folder
32
- # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
33
- # RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
34
- # USER appuser
35
-
36
  # During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
37
  CMD ["gunicorn", "--bind", "0.0.0.0:8000", "-k", "uvicorn.workers.UvicornWorker", "main:app"]
 
14
  # RUN python -m pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
15
  RUN python -m pip install -r requirements.txt
16
 
17
+ #RUN adduser -u 5678 --disabled-password --gecos "" appuser
18
+ #USER appuser
19
 
20
  WORKDIR /app
21
  COPY . /app
22
 
23
+
24
+ # Creates a non-root user with an explicit UID and adds permission to access the /app folder
25
+ # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
26
+ RUN adduser -u 5678 --disabled-password --gecos "" appuser# && chown -R appuser /app
27
+ USER appuser
28
+
29
  RUN mkdir -p /app/hub
30
  RUN chmod 777 /app
31
+ RUN chown appuser /app
 
32
 
33
  RUN chmod 777 /app/hub
34
  # RUN chown appuser /app/hub
35
 
 
 
 
 
 
36
  # During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
37
  CMD ["gunicorn", "--bind", "0.0.0.0:8000", "-k", "uvicorn.workers.UvicornWorker", "main:app"]