-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (20 loc) · 763 Bytes
/
Dockerfile
File metadata and controls
32 lines (20 loc) · 763 Bytes
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
# Step 1 select default OS image
FROM alpine
# # Step 2 tell what you want to do
RUN apk add py3-pip
RUN apk add --no-cache python3-dev && pip3 install --upgrade pip
# # Step 3 Configure a software
# # Defining working directory
WORKDIR /app
# # Copy everything which is present in my docker directory to working (/app)
COPY /requirements.txt /app
RUN pip3 install -r requirements.txt
COPY ["MongoAPI.py", "/app"]
COPY ["App.py", "/app"]
# Exposing an internal port
EXPOSE 5001
# Step 4 set default commands
# These are permanent commands i.e even if user will provide come commands those will be considered as argunemts of this command
ENTRYPOINT [ "python3" ]
# These commands will be replaced if user provides any command by himself
CMD ["App.py"]