Skip to content

Commit

Permalink
Merge branch 'main' of github.com:andrewthetechie/gha-cookiecutter
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewthetechie committed Jun 10, 2022
2 parents 96aee52 + 93317ca commit 23fa19a
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
# Distroless runs python 3.9.2
FROM python:3.9.2-slim as builder
ADD Docker/rootfs /
ADD main.py /app/main.py
ADD action.yml /app/action.yml

# We are installing a dependency here directly into our app source dir
RUN pip install --target=/app -r /requirements.txt
RUN cd /tmp && \
apt-get update && \
apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests \
--no-conflicts --no-breaks --no-replaces --no-enhances \
--no-pre-depends git | grep -v libc | grep "^\w") libcurl3-gnutls && \
mkdir /dpkg && \
for deb in *.deb; do dpkg --extract $deb /dpkg || exit 10; done

# A distroless container image with Python and some basics like SSL certificates
# https://github.com/GoogleContainerTools/distroless
FROM gcr.io/distroless/python3:debug
COPY --from=builder /app /app
COPY --from=builder /dpkg /
WORKDIR /app
ENV PYTHONPATH /app
CMD ["/app/main.py"]
# This file is generated from Docker/ActionDockerfile.j2 as part of the release ci
# Don't modify it directly
FROM andrewthetechie/gha-cookiecutter:v1.0.1

0 comments on commit 23fa19a

Please sign in to comment.