-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use rabe base image and wheel multistage build (#118)
- Loading branch information
Showing
2 changed files
with
22 additions
and
7 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
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,8 +1,20 @@ | ||
FROM python:3-alpine@sha256:2a068b9442f61f4480306d44e3b166bfe3343761e9bd57c38f66302ebf28fd9e | ||
FROM ghcr.io/radiorabe/s2i-python:0.5.1 AS build | ||
|
||
WORKDIR /src | ||
COPY requirements.txt /src/ | ||
RUN ["pip","install","--no-cache-dir","-r","/src/requirements.txt"] | ||
COPY . /src/ | ||
COPY ./ $HOME | ||
|
||
ENTRYPOINT ["python","-m","suisa_sendemeldung.suisa_sendemeldung"] | ||
RUN python3 setup.py bdist_wheel | ||
|
||
|
||
FROM ghcr.io/radiorabe/python-minimal:0.5.1 AS app | ||
|
||
COPY --from=build /opt/app-root/src/dist/*.whl /tmp/dist/ | ||
|
||
RUN python3 -mpip --no-cache-dir install /tmp/dist/*.whl \ | ||
&& rm -rf /tmp/dist/ | ||
|
||
# make requests use os ca certs that contain the RaBe root CA | ||
ENV REQUESTS_CA_BUNDLE=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem | ||
|
||
USER nobody | ||
|
||
ENTRYPOINT ["suisa_sendemeldung"] |