File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM python:3-slim AS builder
2- ADD . /app
3- WORKDIR /app
1+ # Deriving the latest base image
2+ FROM python:slim-buster
3+
4+
5+ # Labels as key value pair
6+ LABEL Maintainer="roushan.me17"
7+
8+
9+ # Any working directory can be chosen as per choice like '/' or '/home' etc
10+ # i have chosen /usr/app/src
11+ WORKDIR /
12+
13+ # to COPY the remote file at working directory in container
14+ COPY * ./
15+ # Now the structure looks like this '/usr/app/src/test.py'
416
5- # We are installing a dependency here directly into our app source dir
617RUN pip install -r requirements.txt
18+ # CMD instruction should be used to run the software
19+ # contained by your image, along with any arguments.
720
8- # A distroless container image with Python and some basics like SSL certificates
9- # https://github.com/GoogleContainerTools/distroless
10- FROM gcr.io/distroless/python3-debian10
11- COPY --from=builder /app /app
12- WORKDIR /app
13- ENV PYTHONPATH /app
14- CMD ["/cmd/main.py" ]
21+ CMD [ "python3" , "./main.py" ]
You can’t perform that action at this time.
0 commit comments