More image build changes
This commit is contained in:
parent
06c14e985f
commit
6d2c7ca328
|
@ -20,4 +20,3 @@ Use a bind mount for the config file (ckan.ini)
|
||||||
|
|
||||||
Maybe include a script to replace docker-compose if required
|
Maybe include a script to replace docker-compose if required
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
Build the images from this directory using:
|
Build the images from this directory using:
|
||||||
|
cd ckan-base/
|
||||||
|
docker build -t ckan/ckan-base:testing-only.2.9 -f 2.9/Dockerfile .
|
||||||
|
docker build -t ckan/ckan-base:testing-only.2.8 -f 2.8/Dockerfile .
|
||||||
|
docker build -t ckan/ckan-base:testing-only.2.7 -f 2.7/Dockerfile .
|
||||||
|
|
||||||
docker build -t openknowledge/ckan-dev:2.7 -f 2.7/Dockerfile .
|
Login to Dockerhub
|
||||||
docker build -t openknowledge/ckan-dev:2.8 -f 2.8/Dockerfile .
|
docker login --username=kowhai
|
||||||
|
(will then ask for a password)
|
||||||
|
|
||||||
|
Push image to (ckan) Dockerhub
|
||||||
|
docker push ckan/ckan-base:testing-only.2.9
|
||||||
|
<same with 2.8 and 2.7>
|
||||||
|
|
|
@ -8,7 +8,7 @@ ENV PIP_SRC=${SRC_DIR}
|
||||||
ENV CKAN_STORAGE_PATH=/var/lib/ckan
|
ENV CKAN_STORAGE_PATH=/var/lib/ckan
|
||||||
ENV GIT_URL=https://github.com/ckan/ckan.git
|
ENV GIT_URL=https://github.com/ckan/ckan.git
|
||||||
# CKAN version to build
|
# CKAN version to build
|
||||||
ENV GIT_BRANCH=ckan-2.7.8
|
ENV GIT_BRANCH=ckan-2.7.12
|
||||||
# Customize these on the .env file if needed
|
# Customize these on the .env file if needed
|
||||||
ENV CKAN_SITE_URL=http://localhost:5000
|
ENV CKAN_SITE_URL=http://localhost:5000
|
||||||
ENV CKAN__PLUGINS image_view text_view recline_view datastore datapusher envvars
|
ENV CKAN__PLUGINS image_view text_view recline_view datastore datapusher envvars
|
||||||
|
@ -46,11 +46,11 @@ RUN apk add --no-cache tzdata \
|
||||||
python-dev \
|
python-dev \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libxslt-dev \
|
libxslt-dev \
|
||||||
linux-headers && \
|
linux-headers
|
||||||
# Create SRC_DIR
|
# Create SRC_DIR
|
||||||
mkdir -p ${SRC_DIR} && \
|
RUN mkdir -p ${SRC_DIR} && \
|
||||||
# Install pip, supervisord and uwsgi
|
# Install pip, supervisord and uwsgi
|
||||||
curl -o ${SRC_DIR}/get-pip.py https://bootstrap.pypa.io/2.7/get-pip.py && \
|
curl -o ${SRC_DIR}/get-pip.py https://bootstrap.pypa.io/pip/2.7/get-pip.py && \
|
||||||
python ${SRC_DIR}/get-pip.py 'pip==20.3.3' && \
|
python ${SRC_DIR}/get-pip.py 'pip==20.3.3' && \
|
||||||
pip install supervisor && \
|
pip install supervisor && \
|
||||||
mkdir /etc/supervisord.d && \
|
mkdir /etc/supervisord.d && \
|
||||||
|
|
|
@ -8,7 +8,7 @@ ENV PIP_SRC=${SRC_DIR}
|
||||||
ENV CKAN_STORAGE_PATH=/var/lib/ckan
|
ENV CKAN_STORAGE_PATH=/var/lib/ckan
|
||||||
ENV GIT_URL=https://github.com/ckan/ckan.git
|
ENV GIT_URL=https://github.com/ckan/ckan.git
|
||||||
# CKAN version to build
|
# CKAN version to build
|
||||||
ENV GIT_BRANCH=ckan-2.8.5
|
ENV GIT_BRANCH=ckan-2.8.9
|
||||||
# Customize these on the .env file if needed
|
# Customize these on the .env file if needed
|
||||||
ENV CKAN_SITE_URL=http://localhost:5000
|
ENV CKAN_SITE_URL=http://localhost:5000
|
||||||
ENV CKAN__PLUGINS image_view text_view recline_view datastore datapusher envvars
|
ENV CKAN__PLUGINS image_view text_view recline_view datastore datapusher envvars
|
||||||
|
@ -46,11 +46,11 @@ RUN apk add --no-cache tzdata \
|
||||||
python-dev \
|
python-dev \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libxslt-dev \
|
libxslt-dev \
|
||||||
linux-headers && \
|
linux-headers
|
||||||
# Create SRC_DIR
|
# Create SRC_DIR
|
||||||
mkdir -p ${SRC_DIR} && \
|
RUN mkdir -p ${SRC_DIR} && \
|
||||||
# Install pip, supervisord and uwsgi
|
# Install pip, supervisord and uwsgi
|
||||||
curl -o ${SRC_DIR}/get-pip.py https://bootstrap.pypa.io/2.7/get-pip.py && \
|
curl -o ${SRC_DIR}/get-pip.py https://bootstrap.pypa.io/pip/2.7/get-pip.py && \
|
||||||
python ${SRC_DIR}/get-pip.py 'pip==20.3.3' && \
|
python ${SRC_DIR}/get-pip.py 'pip==20.3.3' && \
|
||||||
pip install supervisor && \
|
pip install supervisor && \
|
||||||
mkdir /etc/supervisord.d && \
|
mkdir /etc/supervisord.d && \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.7
|
FROM alpine:3.13
|
||||||
|
|
||||||
# Internal environment variables
|
# Internal environment variables
|
||||||
ENV APP_DIR=/srv/app
|
ENV APP_DIR=/srv/app
|
||||||
|
@ -8,7 +8,7 @@ ENV PIP_SRC=${SRC_DIR}
|
||||||
ENV CKAN_STORAGE_PATH=/var/lib/ckan
|
ENV CKAN_STORAGE_PATH=/var/lib/ckan
|
||||||
ENV GIT_URL=https://github.com/ckan/ckan.git
|
ENV GIT_URL=https://github.com/ckan/ckan.git
|
||||||
# CKAN version to build
|
# CKAN version to build
|
||||||
ENV GIT_BRANCH=ckan-2.9.0
|
ENV GIT_BRANCH=ckan-2.9.4
|
||||||
# Customize these on the .env file if needed
|
# Customize these on the .env file if needed
|
||||||
ENV CKAN_SITE_URL=http://localhost:5000
|
ENV CKAN_SITE_URL=http://localhost:5000
|
||||||
ENV CKAN__PLUGINS image_view text_view recline_view datastore datapusher envvars
|
ENV CKAN__PLUGINS image_view text_view recline_view datastore datapusher envvars
|
||||||
|
@ -46,12 +46,13 @@ RUN apk add --no-cache tzdata \
|
||||||
py3-virtualenv \
|
py3-virtualenv \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libxslt-dev \
|
libxslt-dev \
|
||||||
linux-headers && \
|
linux-headers
|
||||||
# Create SRC_DIR
|
|
||||||
mkdir -p ${SRC_DIR} && \
|
# Create SRC_DIR and install pip
|
||||||
|
RUN mkdir -p ${SRC_DIR} && \
|
||||||
# Install pip
|
# Install pip
|
||||||
curl -o ${SRC_DIR}/get-pip.py https://bootstrap.pypa.io/2.7/get-pip.py && \
|
curl -o ${SRC_DIR}/get-pip.py https://bootstrap.pypa.io/get-pip.py && \
|
||||||
python3 ${SRC_DIR}/get-pip.py 'pip==20.3.3' && \
|
python3 ${SRC_DIR}/get-pip.py && \
|
||||||
rm -rf ${SRC_DIR}/get-pip.py
|
rm -rf ${SRC_DIR}/get-pip.py
|
||||||
|
|
||||||
# Set up Python3 virtual environment
|
# Set up Python3 virtual environment
|
||||||
|
@ -67,7 +68,8 @@ RUN pip3 install -e git+${GIT_URL}@${GIT_BRANCH}#egg=ckan && \
|
||||||
pip3 install uwsgi && \
|
pip3 install uwsgi && \
|
||||||
cd ${SRC_DIR}/ckan && \
|
cd ${SRC_DIR}/ckan && \
|
||||||
cp who.ini ${APP_DIR} && \
|
cp who.ini ${APP_DIR} && \
|
||||||
pip install --no-binary :all: -r requirements.txt && \
|
pip3 install -r requirement-setuptools.txt && \
|
||||||
|
pip3 install --no-binary :all: -r requirements.txt && \
|
||||||
# Install CKAN envvars to support loading config from environment variables
|
# Install CKAN envvars to support loading config from environment variables
|
||||||
pip3 install -e git+https://github.com/okfn/ckanext-envvars.git#egg=ckanext-envvars && \
|
pip3 install -e git+https://github.com/okfn/ckanext-envvars.git#egg=ckanext-envvars && \
|
||||||
# Create and update CKAN config
|
# Create and update CKAN config
|
||||||
|
|
Loading…
Reference in New Issue