-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (22 loc) · 1022 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
########### NOTE CODES ARE RUN FROM TOP TO BOTTOM ##################
###############Pull base image########################
#Import slim variant of python(Smaller size) and bullseye(latest release)
FROM python:3.11.1-slim-bullseye
###############Set 3 environment variables###############
#Disable automatic check for pip updates
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
#Python will not try to write .pyc files
ENV PYTHONDONTWRITEBYCODE 1
#Ensure our console output is not buffered by Docker
ENV PYTHONUNBUFFERED 1
################## Set work directory########################
#Use this path as the default location for all subsequent commands(Working Directory)
WORKDIR /code
#Install dependencies
#Copy the requirements.txt file from our local pc to the current working directory(The Image)
COPY ./requirements.txt .
#Running pip install (Run and install all its content)
RUN pip install -r requirements.txt
#Copy project
#Copy all files from current directory into the working directory on the image
COPY . .