From 2370a91dca465d063b11c5844e5f858f9e3b905e Mon Sep 17 00:00:00 2001 From: Antonin Date: Sun, 21 Aug 2022 22:35:05 +0200 Subject: [PATCH] :construction: edit Dockerfile --- Dockerfile | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 122c3c9..b3471f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,21 @@ -FROM python:3-slim AS builder -ADD . /app -WORKDIR /app +#Deriving the latest base image +FROM python:slim-buster + + +#Labels as key value pair +LABEL Maintainer="roushan.me17" + + +# Any working directory can be chosen as per choice like '/' or '/home' etc +# i have chosen /usr/app/src +WORKDIR / + +#to COPY the remote file at working directory in container +COPY * ./ +# Now the structure looks like this '/usr/app/src/test.py' -# We are installing a dependency here directly into our app source dir RUN pip install -r requirements.txt +#CMD instruction should be used to run the software +#contained by your image, along with any arguments. -# A distroless container image with Python and some basics like SSL certificates -# https://github.com/GoogleContainerTools/distroless -FROM gcr.io/distroless/python3-debian10 -COPY --from=builder /app /app -WORKDIR /app -ENV PYTHONPATH /app -CMD ["/cmd/main.py"] \ No newline at end of file +CMD [ "python3", "./main.py"] \ No newline at end of file