generated from jacobtomlinson/python-container-action
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update actions dockerfile for release
- Loading branch information
1 parent
1491bf5
commit dd681f8
Showing
1 changed file
with
3 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/builder/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.2.0 |