Skip to content

Commit

Permalink
Rebase image on openSUSE Tumbleweed to avoid PyPi packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Oct 13, 2023
1 parent 5171443 commit 3017e7b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
22 changes: 15 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
FROM python:3.12-alpine
FROM registry.opensuse.org/opensuse/bci/python:3.11

COPY requirements.txt /
RUN zypper addrepo https://download.opensuse.org/repositories/SUSE:/CA/openSUSE_Tumbleweed/SUSE:CA.repo && \
zypper --gpg-auto-import-keys -n install ca-certificates-suse && \
zypper -n install \
python3-apache-libcloud \
python3-cachetools \
python3-cryptography \
python3-Jinja2 \
python3-pyramid \
python3-python-dateutil \
python3-pytz \
python311-PyYAML && \
zypper clean -a

RUN apk --no-cache add tzdata && \
pip install --no-cache-dir -r /requirements.txt
ENV REQUESTS_CA_BUNDLE=/etc/ssl/ca-bundle.pem

COPY cloudview/ /cloudview

ENTRYPOINT ["/usr/local/bin/python3", "-m", "cloudview.cloudview"]

CMD []
ENTRYPOINT ["/usr/bin/python3", "-m", "cloudview.cloudview"]
12 changes: 12 additions & 0 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.12-alpine

COPY requirements.txt /

RUN apk --no-cache add tzdata && \
pip install --no-cache-dir -r /requirements.txt

COPY cloudview/ /cloudview

ENTRYPOINT ["/usr/local/bin/python3", "-m", "cloudview.cloudview"]

CMD []

0 comments on commit 3017e7b

Please sign in to comment.