From 95efc96f1ad75f4c5e1a51fcdce32e2e84766f03 Mon Sep 17 00:00:00 2001 From: Brett <54408245+kowh-ai@users.noreply.github.com> Date: Tue, 29 Sep 2020 12:34:56 +0200 Subject: [PATCH] Another Update --- ckan/Dockerfile | 2 +- ckan/Dockerfile.dev | 31 +++++++++++++++++++++++++++++++ docker-compose.yml | 2 +- images/ckan-dev/2.7/Dockerfile | 20 ++++++++++++++++++++ images/ckan-dev/2.8/Dockerfile | 20 ++++++++++++++++++++ images/ckan-dev/2.9/Dockerfile | 2 +- 6 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 ckan/Dockerfile.dev create mode 100755 images/ckan-dev/2.7/Dockerfile create mode 100755 images/ckan-dev/2.8/Dockerfile diff --git a/ckan/Dockerfile b/ckan/Dockerfile index de8e8c9..4e45216 100644 --- a/ckan/Dockerfile +++ b/ckan/Dockerfile @@ -1,4 +1,4 @@ -FROM kowhai/ckan-base:2.9 +FROM ckan/ckan-base:testing-only.2.9 LABEL maintainer="brett@kowh.ai" diff --git a/ckan/Dockerfile.dev b/ckan/Dockerfile.dev new file mode 100644 index 0000000..972701d --- /dev/null +++ b/ckan/Dockerfile.dev @@ -0,0 +1,31 @@ +FROM ckan/ckan-dev:testing-only.2.9 + +LABEL maintainer="brett@kowh.ai" + +# Set timezone +ARG TZ +RUN cp /usr/share/zoneinfo/$TZ /etc/localtime +RUN echo $TZ > /etc/timezone + +# Install any extensions needed by your CKAN instance +# (Make sure to add the plugins to CKAN__PLUGINS in the .env file) +# For instance: +#RUN pip install -e git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages && \ +# pip install -e git+https://github.com/ckan/ckanext-dcat.git@v0.0.6#egg=ckanext-dcat && \ +# pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v0.0.6/requirements.txt + +# Clone the extension(s) your are writing for your own project in the `src` folder +# to get them mounted in this image at runtime + +# Apply any patches needed to CKAN core or any of the built extensions (not the +# runtime mounted ones) +# See https://github.com/okfn/docker-ckan#applying-patches +COPY patches ${APP_DIR}/patches + +RUN for d in $APP_DIR/patches/*; do \ + if [ -d $d ]; then \ + for f in `ls $d/*.patch | sort -g`; do \ + cd $SRC_DIR/`basename "$d"` && echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; patch -p1 < "$f" ; \ + done ; \ + fi ; \ + done diff --git a/docker-compose.yml b/docker-compose.yml index 37987ca..2ac7304 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,7 @@ services: - redis - datapusher ports: - - "0.0.0.0:5000:5000" + - "0.0.0.0:${CKAN_PORT}:5000" volumes: - ckan_storage:/var/lib/ckan diff --git a/images/ckan-dev/2.7/Dockerfile b/images/ckan-dev/2.7/Dockerfile new file mode 100755 index 0000000..a421a59 --- /dev/null +++ b/images/ckan-dev/2.7/Dockerfile @@ -0,0 +1,20 @@ +FROM ckan/ckan-base:testing-only.2.7 + +LABEL maintainer="brett@kowh.ai" + +ENV APP_DIR=/srv/app +ENV SRC_EXTENSIONS_DIR=/srv/app/src_extensions + +# Install packages needed by the dev requirements +RUN apk add --no-cache libffi-dev + +# Install CKAN dev requirements +RUN pip install --no-binary :all: -r https://raw.githubusercontent.com/ckan/ckan/${GIT_BRANCH}/dev-requirements.txt + +# Create folder for local extensions sources +RUN mkdir $SRC_EXTENSIONS_DIR + +COPY setup/start_ckan_development.sh ${APP_DIR} + + +CMD ["/srv/app/start_ckan_development.sh"] diff --git a/images/ckan-dev/2.8/Dockerfile b/images/ckan-dev/2.8/Dockerfile new file mode 100755 index 0000000..6142a8d --- /dev/null +++ b/images/ckan-dev/2.8/Dockerfile @@ -0,0 +1,20 @@ +FROM ckan/ckan-base:testing-only.2.8 + +LABEL maintainer="brett@kowh.ai" + +ENV APP_DIR=/srv/app +ENV SRC_EXTENSIONS_DIR=/srv/app/src_extensions + +# Install packages needed by the dev requirements +RUN apk add --no-cache libffi-dev + +# Install CKAN dev requirements +RUN pip install --no-binary :all: -r https://raw.githubusercontent.com/ckan/ckan/${GIT_BRANCH}/dev-requirements.txt + +# Create folder for local extensions sources +RUN mkdir $SRC_EXTENSIONS_DIR + +COPY setup/start_ckan_development.sh ${APP_DIR} + + +CMD ["/srv/app/start_ckan_development.sh"] diff --git a/images/ckan-dev/2.9/Dockerfile b/images/ckan-dev/2.9/Dockerfile index 0878855..fc170ee 100755 --- a/images/ckan-dev/2.9/Dockerfile +++ b/images/ckan-dev/2.9/Dockerfile @@ -1,4 +1,4 @@ -FROM kowhai/ckan-base:2.9 +FROM ckan/ckan-base:testing-only.2.9 LABEL maintainer="brett@kowh.ai"