diff --git a/containers/Dockerfile b/containers/Dockerfile index 3f3638e0..87e06d8f 100644 --- a/containers/Dockerfile +++ b/containers/Dockerfile @@ -1,13 +1,4 @@ -FROM registry.suse.com/bci/python:3.11 - -# We do the whole installation and configuration in one layer: -COPY requirements.txt /pcw/ -# * Install system requirements -# * Install pip requirements -# * Empty system cache to conserve some space -RUN source /etc/os-release && zypper addrepo -G -cf "https://download.opensuse.org/repositories/SUSE:/CA/$VERSION_ID/SUSE:CA.repo" && \ - zypper -n in ca-certificates-suse gcc libffi-devel && \ - pip install --no-cache-dir wheel && pip install --no-cache-dir -r /pcw/requirements.txt && zypper clean && rm -rf /var/cache +FROM ghcr.io/suse/pcw_base_main:latest # Copy program files only COPY ocw /pcw/ocw/ diff --git a/containers/Dockerfile_dev b/containers/Dockerfile_dev index a94b5789..39ad4ea5 100644 --- a/containers/Dockerfile_dev +++ b/containers/Dockerfile_dev @@ -1,15 +1,8 @@ -FROM registry.suse.com/bci/python:3.11 +FROM ghcr.io/suse/pcw_base_main:latest ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 UWSGI_WSGI_FILE=/pcw/webui/wsgi.py UWSGI_MASTER=1 ENV UWSGI_HTTP_AUTO_CHUNKED=1 UWSGI_HTTP_KEEPALIVE=1 UWSGI_LAZY_APPS=1 UWSGI_WSGI_ENV_BEHAVIOR=holy -## System preparation steps ################################################# ## - -RUN zypper -n in gcc libffi-devel && zypper clean && rm -rf /var/cache - -COPY requirements.txt requirements_test.txt requirements_k8s.txt /tmp/ -RUN pip install --no-cache-dir wheel && pip install --no-cache-dir -r /tmp/requirements_test.txt - WORKDIR /pcw ENTRYPOINT ["sh", "-c"] diff --git a/containers/Dockerfile_k8s b/containers/Dockerfile_k8s index 93694f6d..1a569ea7 100644 --- a/containers/Dockerfile_k8s +++ b/containers/Dockerfile_k8s @@ -1,14 +1,4 @@ -FROM registry.suse.com/bci/python:3.11 - -RUN zypper -n in gcc tar gzip kubernetes1.24-client aws-cli && zypper clean && rm -rf /var/cache - -# Google cli installation -RUN curl -sf https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-415.0.0-linux-x86_64.tar.gz | tar -zxf - -C /opt \ -&& /opt/google-cloud-sdk/bin/gcloud components install gke-gcloud-auth-plugin - -# Install python dependences -COPY requirements_k8s.txt /pcw/ -RUN pip install --no-cache-dir wheel && pip install --no-cache-dir -r /pcw/requirements_k8s.txt +FROM ghcr.io/suse/pcw_base_k8s:latest # Copy program files only COPY ocw /pcw/ocw/ diff --git a/containers/Dockerfile_k8s_dev b/containers/Dockerfile_k8s_dev index 6ac4356d..38d7dd71 100644 --- a/containers/Dockerfile_k8s_dev +++ b/containers/Dockerfile_k8s_dev @@ -1,14 +1,4 @@ -FROM registry.suse.com/bci/python:3.11 - -RUN zypper -n in gcc tar gzip kubernetes1.24-client aws-cli azure-cli && zypper clean && rm -rf /var/cache - -# Google cli installation -RUN curl -s https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-415.0.0-linux-x86_64.tar.gz | tar -zxf - -C /opt \ -&& /opt/google-cloud-sdk/bin/gcloud components install gke-gcloud-auth-plugin - -# Install python dependences -COPY requirements_k8s.txt requirements.txt requirements_test.txt /pcw/ -RUN pip install --no-cache-dir wheel && pip install --no-cache-dir -r /pcw/requirements_k8s.txt +FROM ghcr.io/suse/pcw_base_k8s:latest ENV PATH ${PATH}:/opt/google-cloud-sdk/bin/