From a9abd4b36b7efb610fdcc33e63ee81327659a31c Mon Sep 17 00:00:00 2001 From: "blagoja.stojkoski" Date: Thu, 20 Jan 2022 15:21:59 +0100 Subject: [PATCH] * reverts to alpine 3.13 and native python 3.8 package * downgrades setuptools to 44.1.0 to fix ckan install issues on Ubuntu * fixes solrconfig xml for CKAN 2.7 --- compose/solr/solrconfig-2.7.12.xml | 2 +- images/ckan/2.9/Dockerfile | 28 +++++++++++----------------- images/ckan/2.9/Dockerfile.focal | 6 ++++++ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/compose/solr/solrconfig-2.7.12.xml b/compose/solr/solrconfig-2.7.12.xml index 6269124..6e325cc 120000 --- a/compose/solr/solrconfig-2.7.12.xml +++ b/compose/solr/solrconfig-2.7.12.xml @@ -1 +1 @@ -solrconfig-2.8.9.xml \ No newline at end of file +solrconfig-2.8.10.xml \ No newline at end of file diff --git a/images/ckan/2.9/Dockerfile b/images/ckan/2.9/Dockerfile index cf14a8f..d20a965 100644 --- a/images/ckan/2.9/Dockerfile +++ b/images/ckan/2.9/Dockerfile @@ -1,7 +1,7 @@ ################## ### Build CKAN ### ################## -FROM alpine:3.14.2 as ckanbuild +FROM alpine:3.13.7 as ckanbuild # Used by Github Actions to tag the image with ENV IMAGE_TAG=2.9.5 @@ -17,11 +17,9 @@ ENV PIP_SRC=${SRC_DIR} WORKDIR ${SRC_DIR} # Packages to build CKAN requirements and plugins -# Make sure we install python 3.8, cause CKAN is not compatible with 3.9 -RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.13/main \ - python3=3.8.10-r0 \ - python3-dev=3.8.10-r0 && \ - apk add --no-cache \ +RUN apk add --no-cache \ + python3 \ + python3-dev \ git \ curl \ postgresql-dev \ @@ -68,7 +66,7 @@ RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==21.1.2 greenlet==1.1.0 ########################### ### Default-Extensions #### ########################### -FROM alpine:3.14.2 as extbuild +FROM alpine:3.13.7 as extbuild # Set src dirs ENV SRC_DIR=/srv/app/src @@ -81,11 +79,9 @@ ENV DEFAULT_EXTENSIONS envvars ENV ENVVARS_GIT_URL=https://github.com/okfn/ckanext-envvars ENV ENVVARS_GIT_BRANCH=0.0.1 -# Make sure we install python 3.8, cause CKAN is not compatible with 3.9 -RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.13/main \ - python3=3.8.10-r0 \ - python3-dev=3.8.10-r0 && \ - apk add --no-cache \ +RUN apk add --no-cache \ + python3 \ + python3-dev \ git \ curl @@ -105,7 +101,7 @@ RUN pip wheel --wheel-dir=/wheels git+${ENVVARS_GIT_URL}@${ENVVARS_GIT_BRANCH}#e ############ ### MAIN ### ############ -FROM alpine:3.14.2 +FROM alpine:3.13.7 LABEL maintainer="Keitaro Inc " LABEL org.opencontainers.image.source https://github.com/keitaroinc/docker-ckan @@ -119,10 +115,8 @@ ENV CKAN_SITE_URL=http://localhost:5000 ENV CKAN__PLUGINS envvars image_view text_view recline_view datastore datapusher # Install necessary packages to run CKAN -# Make sure we install python 3.8, cause CKAN is not compatible with 3.9 -RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.13/main \ - python3=3.8.10-r0 && \ - apk add --no-cache git \ +RUN apk add --no-cache \ + python3 \ bash \ gettext \ curl \ diff --git a/images/ckan/2.9/Dockerfile.focal b/images/ckan/2.9/Dockerfile.focal index 87cd417..c8edbcb 100644 --- a/images/ckan/2.9/Dockerfile.focal +++ b/images/ckan/2.9/Dockerfile.focal @@ -118,6 +118,9 @@ RUN mkdir -p ${SRC_DIR} RUN curl -o ${SRC_DIR}/get-pip.py https://bootstrap.pypa.io/get-pip.py && \ python ${SRC_DIR}/get-pip.py +# Downgrade setuptools so that CKAN requirements can be built +RUN pip install setuptools==44.1.0 + # Fetch and build the default CKAN extensions RUN pip wheel --wheel-dir=/wheels git+${ENVVARS_GIT_URL}@${ENVVARS_GIT_BRANCH}#egg=ckanext-envvars @@ -180,6 +183,9 @@ RUN apt-get update && \ RUN curl -o ${SRC_DIR}/get-pip.py https://bootstrap.pypa.io/get-pip.py && \ python ${SRC_DIR}/get-pip.py +# Downgrade setuptools so that CKAN requirements can be built +RUN pip install setuptools==44.1.0 + # Get artifacts from build stages COPY --from=ckanbuild /wheels /srv/app/wheels COPY --from=extbuild /wheels /srv/app/ext_wheels