binaryfarmer commited on
Commit
032da9f
·
1 Parent(s): e72214d

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # For more information, please refer to https://aka.ms/vscode-docker-python
2
+ FROM python:3.10-slim
3
+
4
+ # Keeps Python from generating .pyc files in the container
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+
7
+ # Turns off buffering for easier container logging
8
+ ENV PYTHONUNBUFFERED=1
9
+
10
+ # Install pip requirements
11
+ COPY requirements.txt .
12
+ RUN python -m pip install -r requirements.txt
13
+
14
+ WORKDIR /app
15
+ COPY . /app
16
+
17
+ # Creates a non-root user with an explicit UID and adds permission to access the /app folder
18
+ # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
19
+ RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
20
+ USER appuser
21
+
22
+ # During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
23
+ CMD ["python", "src\main.py"]