From 6b0986038282aaa210282e8c5132a9c06bfa13f7 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 3 Dec 2024 10:32:16 +0100 Subject: [PATCH] Remove extra Dockerfiles (conflicted copy) --- ...MacBook Pro's conflicted copy 2024-11-29)" | 158 ---------------- ...Book Pro's conflicted copy 2024-11-29).10" | 156 ---------------- ...MacBook Pro's conflicted copy 2024-11-29)" | 171 ------------------ ...cBook Pro's conflicted copy 2024-11-29).9" | 165 ----------------- ...MacBook Pro's conflicted copy 2024-11-29)" | 64 ------- 5 files changed, 714 deletions(-) delete mode 100644 "ckan-2.10/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" delete mode 100644 "ckan-2.10/Dockerfile.py3 (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29).10" delete mode 100644 "ckan-2.9/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" delete mode 100644 "ckan-2.9/Dockerfile.py3 (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29).9" delete mode 100755 "datapusher/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" diff --git "a/ckan-2.10/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" "b/ckan-2.10/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" deleted file mode 100644 index e54b8df..0000000 --- "a/ckan-2.10/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" +++ /dev/null @@ -1,158 +0,0 @@ -ARG ENV=base - -FROM alpine:3.17 AS alpine - - -# ┌─────────────────────────────────────────────────────────────┐ -# │ │ -# │ Base image (Production env) │ -# │ --------------------------- │ -# │ This is always built │ -# │ │ -# └─────────────────────────────────────────────────────────────┘ - - -FROM alpine AS base - -# Tag passed through via the Makefile -ARG CKAN_REF=${CKAN_REF} -# Make it available to child images -ENV CKAN_REF=${CKAN_REF} - -# Internals, you probably don't need to change these -ENV TZ=UTC -ENV APP_DIR=/srv/app -ENV SRC_DIR=${APP_DIR}/src -ENV CKAN_INI=${APP_DIR}/ckan.ini -ENV PIP_SRC=${SRC_DIR} -ENV CKAN_STORAGE_PATH=/var/lib/ckan -ENV GIT_URL=https://github.com/ckan/ckan.git - -# Customize these on the .env file if needed -ENV CKAN_SITE_URL=http://localhost:5000 -ENV CKAN__PLUGINS="image_view text_view recline_view datastore envvars" - -# UWSGI options -ENV UWSGI_HARAKIRI=50 - -WORKDIR ${APP_DIR} - -# Set up timezone -RUN apk add --no-cache tzdata -RUN echo ${TZ} > /etc/timezone -# Make sure both files are not exactly the same -RUN if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then \ - cp /usr/share/zoneinfo/${TZ} /etc/localtime ;\ - fi ; - -# Install necessary packages to run CKAN -RUN apk add --no-cache git \ - gettext \ - postgresql-client \ - python3 \ - libxml2 \ - libxslt \ - musl-dev \ - uwsgi \ - uwsgi-http \ - uwsgi-corerouter \ - uwsgi-python \ - libmagic \ - curl \ - patch \ - bash && \ - # Packages to build CKAN requirements and plugins - apk add --no-cache --virtual .build-deps \ - postgresql-dev \ - gcc \ - make \ - g++ \ - autoconf \ - automake \ - libtool \ - python3-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - openssl-dev \ - libffi-dev \ - cargo && \ - # Create SRC_DIR - mkdir -p ${SRC_DIR} && \ - # Install pip, supervisord and uwsgi - curl -o ${SRC_DIR}/get-pip.py https://bootstrap.pypa.io/get-pip.py && \ - python3 ${SRC_DIR}/get-pip.py && \ - pip3 install supervisor && \ - mkdir /etc/supervisord.d && \ - rm -rf ${SRC_DIR}/get-pip.py - -COPY setup/supervisord.conf /etc - -# Install CKAN -RUN pip3 install -e git+${GIT_URL}@${CKAN_REF}#egg=ckan && \ - cd ${SRC_DIR}/ckan && \ - pip3 install --no-binary markdown -r requirements.txt && \ - # Install CKAN envvars to support loading config from environment variables - pip3 install -e git+https://github.com/okfn/ckanext-envvars.git@v0.0.6#egg=ckanext-envvars && \ - # Create and update CKAN config - ckan generate config ${CKAN_INI} && \ - ckan config-tool ${CKAN_INI} "beaker.session.secret = " && \ - ckan config-tool ${CKAN_INI} "ckan.plugins = ${CKAN__PLUGINS}" - -# Create a local user and group to run the app -RUN addgroup -g 92 -S ckan && \ - adduser -u 92 -h /home/ckan -s /bin/bash -D -G ckan ckan - -# Create local storage folder -RUN mkdir -p ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan ${CKAN_STORAGE_PATH} - -COPY setup/prerun.py ${APP_DIR} -COPY setup/start_ckan.sh ${APP_DIR} -ADD https://raw.githubusercontent.com/ckan/ckan/${CKAN_REF}/wsgi.py ${APP_DIR} -RUN chmod 644 ${APP_DIR}/wsgi.py - -# Create entrypoint directory for children image scripts -ONBUILD RUN mkdir /docker-entrypoint.d - -EXPOSE 5000 - -HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] - -CMD ["/srv/app/start_ckan.sh"] - - -# ┌─────────────────────────────────────────────────────────────┐ -# │ │ -# │ Dev image (Development env) │ -# │ --------------------------- │ -# │ This is only built when ENV=dev │ -# │ │ -# └─────────────────────────────────────────────────────────────┘ - - -FROM base AS dev - -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 pip3 install -r https://raw.githubusercontent.com/ckan/ckan/${CKAN_REF}/dev-requirements.txt - -# Create folder for local extensions sources -RUN mkdir -p ${SRC_EXTENSIONS_DIR} - -# These are used to run https on development mode -COPY setup/unsafe.cert setup/unsafe.key ${APP_DIR} - -COPY setup/start_ckan_development.sh ${APP_DIR} - -CMD ["/srv/app/start_ckan_development.sh"] - - -# ────────────────────────────────────────────────────────────── - - -FROM ${ENV} AS final diff --git "a/ckan-2.10/Dockerfile.py3 (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29).10" "b/ckan-2.10/Dockerfile.py3 (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29).10" deleted file mode 100644 index 538ac53..0000000 --- "a/ckan-2.10/Dockerfile.py3 (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29).10" +++ /dev/null @@ -1,156 +0,0 @@ -ARG ENV=base - -FROM python:3.10-slim-bookworm AS python - - -# ┌─────────────────────────────────────────────────────────────┐ -# │ │ -# │ Base image (Production env) │ -# │ --------------------------- │ -# │ This is always built │ -# │ │ -# └─────────────────────────────────────────────────────────────┘ - - -FROM python AS base - -# Tag passed through via the Makefile -ARG CKAN_REF=${CKAN_REF} -# Make it available to child images -ENV CKAN_REF=${CKAN_REF} - -# Internals, you probably don't need to change these -ENV TZ=UTC -ENV APP_DIR=/srv/app -ENV SRC_DIR=${APP_DIR}/src -ENV CKAN_INI=${APP_DIR}/ckan.ini -ENV PIP_SRC=${SRC_DIR} -ENV CKAN_STORAGE_PATH=/var/lib/ckan -ENV GIT_URL=https://github.com/ckan/ckan.git - -# Customize these in the environment (.env) file if needed -ENV CKAN_SITE_URL=http://localhost:5000 -ENV CKAN__PLUGINS="image_view text_view recline_view datastore envvars" - -# UWSGI options -ENV UWSGI_HARAKIRI=50 - -WORKDIR ${APP_DIR} - -# Set up timezone -RUN echo ${TZ} > /etc/timezone - -# Set LC_ALL=en_US.UTF-8 will ensure that all locale-dependent operations in the current environment -# will use English language and United States cultural conventions with UTF-8 character encoding -ENV LC_ALL=en_US.UTF-8 - -# Set the locale -RUN apt-get update -RUN apt-get install --no-install-recommends -y locales -RUN sed -i "/$LC_ALL/s/^# //g" /etc/locale.gen -RUN dpkg-reconfigure --frontend=noninteractive locales -RUN update-locale LANG=${LC_ALL} - -# Install system libraries -RUN apt-get install --no-install-recommends -y \ - apt-utils \ - git \ - libpq-dev \ - g++ \ - linux-headers-generic \ - libtool \ - wget - -# Create the src directory -RUN mkdir -p ${SRC_DIR} - -# Install supervisord and create the supervisord.d directory -RUN apt-get install --no-install-recommends -y \ - supervisor && \ - mkdir /etc/supervisord.d - -COPY setup/supervisord.py3.conf /etc/supervisord.conf - -# Install uwsgi, the CKAN application, the dependency packages for CKAN plus some confiquration -RUN pip3 install -U pip && \ - pip3 install uwsgi && \ - cd ${SRC_DIR} && \ - pip3 install -e git+${GIT_URL}@${CKAN_REF}#egg=ckan && \ - cd ckan && \ - pip3 install --no-binary markdown -r requirements.txt && \ - # Install CKAN envvars to support loading config from environment variables - pip3 install -e git+https://github.com/okfn/ckanext-envvars.git@v0.0.6#egg=ckanext-envvars && \ - # Create and update CKAN config - ckan generate config ${CKAN_INI} && \ - ckan config-tool ${CKAN_INI} "beaker.session.secret = " && \ - ckan config-tool ${CKAN_INI} "ckan.plugins = ${CKAN__PLUGINS}" - -# Create ckan and ckan-sys users and the ckan-sys group plus set up the storage path -RUN groupadd -g 502 ckan-sys && \ - useradd -rm -d /srv/app -s /bin/bash -g ckan-sys -u 502 ckan-sys && \ - useradd -rm -d /srv/app -s /bin/bash -g ckan-sys -u 503 ckan - -COPY setup/prerun.py ${APP_DIR} -COPY setup/start_ckan.sh ${APP_DIR} -ADD https://raw.githubusercontent.com/ckan/ckan/${CKAN_REF}/wsgi.py ${APP_DIR} -RUN chmod 644 ${APP_DIR}/wsgi.py - -# Create entrypoint directory for children image scripts -RUN mkdir -p /docker-entrypoint.d && chmod 755 /docker-entrypoint.d - -# Set the ownership of the app directory, usr/local and the entrypoint directory to the ckan-sys user -RUN chown -R ckan-sys:ckan-sys ${APP_DIR} && \ - chown -R ckan-sys:ckan-sys /docker-entrypoint.d && \ - chown -R ckan-sys:ckan-sys /usr/local - -# Set the ownership of the CKAN config file, src and the storage path to the ckan user -RUN chown ckan:ckan-sys ${APP_DIR}/ckan.ini && \ - chown -R ckan:ckan-sys ${APP_DIR}/src && \ - mkdir -p ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan-sys ${CKAN_STORAGE_PATH} - -USER ckan - -EXPOSE 5000 - -HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] - -CMD ["/srv/app/start_ckan.sh"] - - -# ┌─────────────────────────────────────────────────────────────┐ -# │ │ -# │ Dev image (Development env) │ -# │ --------------------------- │ -# │ This is only built when ENV=dev │ -# │ │ -# └─────────────────────────────────────────────────────────────┘ - - -FROM base AS dev - -ENV SRC_EXTENSIONS_DIR=${APP_DIR}/src_extensions - -USER root - -# Install CKAN dev requirements -RUN cd ${SRC_DIR}/ckan && \ -pip3 install -r https://raw.githubusercontent.com/ckan/ckan/${CKAN_REF}/dev-requirements.txt - -COPY --chown=ckan-sys:ckan-sys setup/unsafe.cert setup/unsafe.key setup/start_ckan_development.sh setup/install_src.sh ${APP_DIR} - -# Update local directories -RUN mkdir -p ${SRC_EXTENSIONS_DIR} /var/lib/ckan && \ - chown -R ckan-sys:ckan-sys ${SRC_EXTENSIONS_DIR} && \ - chown -R ckan:ckan-sys /var/lib/ckan/ && \ - chmod 775 ${SRC_EXTENSIONS_DIR} - -USER ckan - -CMD ["/srv/app/start_ckan_development.sh"] - - -# ────────────────────────────────────────────────────────────── - - -FROM ${ENV} AS final diff --git "a/ckan-2.9/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" "b/ckan-2.9/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" deleted file mode 100644 index c2e95ac..0000000 --- "a/ckan-2.9/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" +++ /dev/null @@ -1,171 +0,0 @@ -ARG ENV=base - -FROM alpine:3.15 AS alpine - - -# ┌─────────────────────────────────────────────────────────────┐ -# │ │ -# │ Base image (Production env) │ -# │ --------------------------- │ -# │ This is always built │ -# │ │ -# └─────────────────────────────────────────────────────────────┘ - - -FROM alpine AS base - -# Tag passed through via the Makefile -ARG CKAN_REF=${CKAN_REF} -# Make it available to child images -ENV CKAN_REF=${CKAN_REF} - -# Internals, you probably don't need to change these -ENV TZ=UTC -ENV APP_DIR=/srv/app -ENV SRC_DIR=${APP_DIR}/src -ENV CKAN_INI=${APP_DIR}/ckan.ini -ENV PIP_SRC=${SRC_DIR} -ENV CKAN_STORAGE_PATH=/var/lib/ckan -ENV GIT_URL=https://github.com/ckan/ckan.git - -# Customize these on the .env file if needed -ENV CKAN_SITE_URL=http://localhost:5000 -ENV CKAN__PLUGINS="image_view text_view recline_view datastore envvars" - -# UWSGI options -ENV UWSGI_HARAKIRI=50 - -WORKDIR ${APP_DIR} - -# Set up timezone -RUN apk add --no-cache tzdata -RUN echo ${TZ} > /etc/timezone -# Make sure both files are not exactly the same -RUN if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then \ - cp /usr/share/zoneinfo/${TZ} /etc/localtime ;\ - fi ; - -# Install necessary packages to run CKAN -RUN apk add --no-cache git \ - gettext \ - postgresql-client \ - python3 \ - py3-pip \ - libxml2 \ - libxslt \ - musl-dev \ - uwsgi \ - uwsgi-http \ - uwsgi-corerouter \ - uwsgi-python \ - py3-gevent \ - uwsgi-gevent \ - libmagic \ - curl \ - patch && \ - # Packages to build CKAN requirements and plugins - apk add --no-cache --virtual .build-deps \ - postgresql-dev \ - gcc \ - make \ - g++ \ - autoconf \ - automake \ - libtool \ - python3-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - openssl-dev \ - libffi-dev \ - cargo && \ - # Create SRC_DIR - mkdir -p ${SRC_DIR} && \ - # Install pip, supervisord and uwsgi - pip3 install "webassets==0.12.1" && \ - curl -o ${SRC_DIR}/get-pip.py https://bootstrap.pypa.io/get-pip.py && \ - python3 ${SRC_DIR}/get-pip.py && \ - pip3 install supervisor && \ - mkdir /etc/supervisord.d && \ - #pip wheel --wheel-dir=/wheels uwsgi gevent && \ - rm -rf ${SRC_DIR}/get-pip.py - -COPY setup/supervisord.conf /etc - -# Install CKAN -RUN pip3 install -e git+${GIT_URL}@${CKAN_REF}#egg=ckan && \ - cd ${SRC_DIR}/ckan && \ - cp who.ini ${APP_DIR} && \ - # begin workaround - pip3 install "cython<3.0.0" && \ - pip3 install "pyyaml==5.4.1" --no-build-isolation && \ - # end workaround - pip3 install -r requirement-setuptools.txt && \ - pip3 install --no-binary markdown -r requirements.txt && \ - # Install CKAN envvars to support loading config from environment variables - pip3 install -e git+https://github.com/okfn/ckanext-envvars.git#egg=ckanext-envvars && \ - # Create and update CKAN config - ckan generate config ${CKAN_INI} && \ - ckan config-tool ${CKAN_INI} "beaker.session.secret = " && \ - ckan config-tool ${CKAN_INI} "ckan.plugins = ${CKAN__PLUGINS}" - -# Create a local user and group to run the app -RUN addgroup -g 92 -S ckan && \ - adduser -u 92 -h /home/ckan -s /bin/bash -D -G ckan ckan - -# Create local storage folder -RUN mkdir -p ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan ${CKAN_STORAGE_PATH} - -COPY setup/prerun.py ${APP_DIR} -COPY setup/start_ckan.sh ${APP_DIR} -ADD https://raw.githubusercontent.com/ckan/ckan/${CKAN_REF}/wsgi.py ${APP_DIR} -RUN chmod 644 ${APP_DIR}/wsgi.py - -# Create entrypoint directory for children image scripts -ONBUILD RUN mkdir /docker-entrypoint.d - -EXPOSE 5000 - -HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit 1 - -CMD ["/srv/app/start_ckan.sh"] - - -# ┌─────────────────────────────────────────────────────────────┐ -# │ │ -# │ Dev image (Development env) │ -# │ --------------------------- │ -# │ This is only built when ENV=dev │ -# │ │ -# └─────────────────────────────────────────────────────────────┘ - - -FROM base AS dev - -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 pip3 install -r https://raw.githubusercontent.com/ckan/ckan/${CKAN_REF}/dev-requirements.txt - -# TODO: remove if requirements upgraded upstream -RUN pip3 install -U pytest-rerunfailures - -# Create folder for local extensions sources -RUN mkdir -p ${SRC_EXTENSIONS_DIR} - -# These are used to run https on development mode -COPY setup/unsafe.cert setup/unsafe.key ${APP_DIR} - -COPY setup/start_ckan_development.sh ${APP_DIR} - -CMD ["/srv/app/start_ckan_development.sh"] - - -# ────────────────────────────────────────────────────────────── - - -FROM ${ENV} AS final diff --git "a/ckan-2.9/Dockerfile.py3 (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29).9" "b/ckan-2.9/Dockerfile.py3 (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29).9" deleted file mode 100644 index b3b9d98..0000000 --- "a/ckan-2.9/Dockerfile.py3 (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29).9" +++ /dev/null @@ -1,165 +0,0 @@ -ARG ENV=base - -FROM python:3.9-slim-bookworm AS python - - -# ┌─────────────────────────────────────────────────────────────┐ -# │ │ -# │ Base image (Production env) │ -# │ --------------------------- │ -# │ This is always built │ -# │ │ -# └─────────────────────────────────────────────────────────────┘ - - -FROM python AS base - -# Tag passed through via the Makefile -ARG CKAN_REF=${CKAN_REF} -# Make it available to child images -ENV CKAN_REF=${CKAN_REF} - -# Internals, you probably don't need to change these -ENV TZ=UTC -ENV APP_DIR=/srv/app -ENV SRC_DIR=${APP_DIR}/src -ENV CKAN_INI=${APP_DIR}/ckan.ini -ENV PIP_SRC=${SRC_DIR} -ENV CKAN_STORAGE_PATH=/var/lib/ckan -ENV GIT_URL=https://github.com/ckan/ckan.git - -# Customize these in the environment (.env) file if needed -ENV CKAN_SITE_URL=http://localhost:5000 -ENV CKAN__PLUGINS="image_view text_view recline_view datastore envvars" - -# UWSGI options -ENV UWSGI_HARAKIRI=50 - -WORKDIR ${APP_DIR} - -# Set up timezone -RUN echo ${TZ} > /etc/timezone - -# Set LC_ALL=en_US.UTF-8 will ensure that all locale-dependent operations in the current environment -# will use English language and United States cultural conventions with UTF-8 character encoding -ENV LC_ALL=en_US.UTF-8 - -# Set the locale -RUN apt-get update -RUN apt-get install --no-install-recommends -y locales -RUN sed -i "/$LC_ALL/s/^# //g" /etc/locale.gen -RUN dpkg-reconfigure --frontend=noninteractive locales -RUN update-locale LANG=${LC_ALL} - -# Install system libraries -RUN apt-get install --no-install-recommends -y \ - apt-utils \ - git \ - libpq-dev \ - g++ \ - linux-headers-generic \ - libtool \ - wget - -# Create the src directory -RUN mkdir -p ${SRC_DIR} - -# Install supervisord and create the supervisord.d directory -RUN apt-get install --no-install-recommends -y \ - supervisor && \ - mkdir /etc/supervisord.d - -COPY setup/supervisord.py3.conf /etc/supervisord.conf - -# Install uwsgi, the CKAN application, the dependency packages for CKAN plus some confiquration - -RUN pip3 install "webassets==0.12.1" && \ - pip3 install -U pip && \ - pip3 install uwsgi && \ - cd ${SRC_DIR} && \ - pip3 install -e git+${GIT_URL}@${CKAN_REF}#egg=ckan && \ - cd ckan && \ - cp who.ini ${APP_DIR} && \ - pip3 install "cython<3.0.0" && \ - pip3 install "pyyaml==5.4.1" --no-build-isolation && \ - pip3 install -r requirement-setuptools.txt && \ - pip3 install --no-binary markdown -r requirements.txt && \ - # Install CKAN envvars to support loading config from environment variables - pip3 install -e git+https://github.com/okfn/ckanext-envvars.git#egg=ckanext-envvars && \ - # Create and update CKAN config - ckan generate config ${CKAN_INI} && \ - ckan config-tool ${CKAN_INI} "beaker.session.secret = " && \ - ckan config-tool ${CKAN_INI} "ckan.plugins = ${CKAN__PLUGINS}" - -# Create ckan and ckan-sys users and the ckan-sys group plus set up the storage path -RUN groupadd -g 502 ckan-sys && \ - useradd -rm -d /srv/app -s /bin/bash -g ckan-sys -u 502 ckan-sys && \ - useradd -rm -d /srv/app -s /bin/bash -g ckan-sys -u 503 ckan - -COPY setup/prerun.py ${APP_DIR} -COPY setup/start_ckan.sh ${APP_DIR} -ADD https://raw.githubusercontent.com/ckan/ckan/${CKAN_REF}/wsgi.py ${APP_DIR} -RUN chmod 644 ${APP_DIR}/wsgi.py - -# Create entrypoint directory for children image scripts -RUN mkdir -p /docker-entrypoint.d && chmod 755 /docker-entrypoint.d - -# Set the ownership of the app directory, usr/local and the entrypoint directory to the ckan-sys user -RUN chown -R ckan-sys:ckan-sys ${APP_DIR} && \ - chown -R ckan-sys:ckan-sys /docker-entrypoint.d && \ - chown -R ckan-sys:ckan-sys /usr/local - -# Set the ownership of the CKAN config file, src and the storage path to the ckan user -RUN chown ckan:ckan-sys ${APP_DIR}/ckan.ini && \ - chown -R ckan:ckan-sys ${APP_DIR}/src && \ - mkdir -p ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan-sys ${CKAN_STORAGE_PATH} - -USER ckan - -EXPOSE 5000 - -HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] - -CMD ["/srv/app/start_ckan.sh"] - - -# ┌─────────────────────────────────────────────────────────────┐ -# │ │ -# │ Dev image (Development env) │ -# │ --------------------------- │ -# │ This is only built when ENV=dev │ -# │ │ -# └─────────────────────────────────────────────────────────────┘ - -FROM base AS dev - -ENV SRC_EXTENSIONS_DIR=${APP_DIR}/src_extensions - -USER root - -# Install CKAN dev requirements -#RUN . ${APP_DIR}/bin/activate && \ -RUN cd ${SRC_DIR}/ckan && \ -pip3 install -r https://raw.githubusercontent.com/ckan/ckan/${CKAN_REF}/dev-requirements.txt - -# TODO: remove if requirements upgraded upstream -RUN pip3 install -U pytest-rerunfailures - -COPY --chown=ckan-sys:ckan-sys setup/unsafe.cert setup/unsafe.key setup/start_ckan_development.sh setup/install_src.sh ${APP_DIR} - -# Update local directories -RUN mkdir -p ${SRC_EXTENSIONS_DIR} /var/lib/ckan && \ - chown -R ckan-sys:ckan-sys ${SRC_EXTENSIONS_DIR} && \ - chown -R ckan:ckan-sys /var/lib/ckan/ && \ - chmod 775 ${SRC_EXTENSIONS_DIR} - -USER ckan - -CMD ["/srv/app/start_ckan_development.sh"] - - -# ────────────────────────────────────────────────────────────── - - -FROM ${ENV} AS final diff --git "a/datapusher/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" "b/datapusher/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" deleted file mode 100755 index a0a99a1..0000000 --- "a/datapusher/Dockerfile (Brett\342\200\231s MacBook Pro's conflicted copy 2024-11-29)" +++ /dev/null @@ -1,64 +0,0 @@ -FROM alpine:3.14 - -ARG DATAPUSHER_VERSION=${DATAPUSHER_VERSION} - -ENV TZ=UTC -ENV APP_DIR=/srv/app -ENV GIT_URL https://github.com/ckan/datapusher.git -ENV JOB_CONFIG ${APP_DIR}/datapusher_settings.py - -WORKDIR ${APP_DIR} - -# Set up timezone -RUN apk add --no-cache tzdata -RUN echo ${TZ} > /etc/timezone - -RUN apk add --no-cache \ - python3 \ - py3-pip \ - py3-wheel \ - libffi-dev \ - libmagic \ - libressl-dev \ - libxslt \ - uwsgi \ - uwsgi-http \ - uwsgi-corerouter \ - uwsgi-python \ - # Temporary packages to build DataPusher requirements - && apk add --no-cache --virtual .build-deps \ - gcc \ - git \ - musl-dev \ - python3-dev \ - libxml2-dev \ - libxslt-dev \ - openssl-dev \ - cargo - -RUN mkdir ${APP_DIR}/src && cd ${APP_DIR}/src && \ - git clone -b ${DATAPUSHER_VERSION} --depth=1 --single-branch ${GIT_URL} && \ - cd datapusher && \ - python3 setup.py install - -RUN cd ${APP_DIR}/src && \ - #pip3 install --no-cache-dir -r requirements.txt - pip3 install --no-cache-dir -r https://raw.githubusercontent.com/ckan/datapusher/${DATAPUSHER_VERSION}/requirements.txt - -RUN apk del .build-deps && \ - cp ${APP_DIR}/src/datapusher/deployment/*.* ${APP_DIR} && \ - # Remove default values in ini file - sed -i '/http/d' ${APP_DIR}/datapusher-uwsgi.ini && \ - sed -i '/wsgi-file/d' ${APP_DIR}/datapusher-uwsgi.ini && \ - sed -i '/virtualenv/d' ${APP_DIR}/datapusher-uwsgi.ini && \ - rm -rf ${APP_DIR}/src - -# Create a local user and group to run the app -RUN addgroup -g 92 -S ckan && \ - adduser -u 92 -h /srv/app -H -D -S -G ckan ckan - -USER ckan - -EXPOSE 8800 -CMD ["sh", "-c", \ - "uwsgi --plugins=http,python --enable-threads --http=[::]:8800 --socket=/tmp/uwsgi.sock --ini=`echo ${APP_DIR}`/datapusher-uwsgi.ini --wsgi-file=`echo ${APP_DIR}`/datapusher.wsgi"]