-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (19 loc) · 723 Bytes
/
Dockerfile
File metadata and controls
34 lines (19 loc) · 723 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 --no-cache python3-dev
RUN apk add py3-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 ["MongoDB API.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 ["MongoDB API.py"]