Skip to content

Commit

Permalink
fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
atom-tr committed Oct 13, 2023
1 parent ef7b8c7 commit 67fd31c
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
FROM python:3.11-alpine AS builder
ADD . /app
WORKDIR /app
FROM python:3.11-alpine

# We are installing a dependency here directly into our app source dir
RUN pip install --target=/app requests
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1

# 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
# We are installing a dependency
ADD requirements.txt /app/requirements.txt
RUN pip3 install -r /app/requirements.txt
RUN apk add --no-cache g++ zlib-dev make && pip3 install -r /app/requirements.txt

ADD src/* /app/
ENV PYTHONPATH /app
CMD ["/app/main.py"]
ENTRYPOINT cd /app/ && python3 main.py

0 comments on commit 67fd31c

Please sign in to comment.