From 712abb16b2ffb955988f087a3995a7409b8462fa Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Mon, 2 Oct 2023 07:30:24 +0000 Subject: [PATCH 1/3] Fix dockerfile images --- ckan/Dockerfile | 4 ++-- ckan/Dockerfile.dev | 4 ++-- ckan/Dockerfile.ghcr | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ckan/Dockerfile b/ckan/Dockerfile index 66836b06..9bf9adc5 100644 --- a/ckan/Dockerfile +++ b/ckan/Dockerfile @@ -9,7 +9,7 @@ ENV TZ=UTC WORKDIR ${APP_DIR} # requirements.txt files fixed until next releases -COPY req_fixes req_fixes +COPY req_fixes ./req_fixes # Extensions ### XLoader - 1.0.1 ### @@ -60,7 +60,7 @@ COPY docker-entrypoint.d/* /docker-entrypoint.d/ COPY setup/who.ini ./ # Apply any patches needed to CKAN core -COPY patches patches +COPY patches ./ RUN for d in $APP_DIR/patches/*; do \ if [ -d $d ]; then \ diff --git a/ckan/Dockerfile.dev b/ckan/Dockerfile.dev index c87c3ad0..68c6ffb5 100644 --- a/ckan/Dockerfile.dev +++ b/ckan/Dockerfile.dev @@ -57,12 +57,12 @@ COPY docker-entrypoint.d/* docker-entrypoint.d/ COPY setup/who.ini ./ # Override start_ckan.sh with DEV sh -COPY setup/start_ckan_development.sh.override start_ckan_development.sh +COPY setup/start_ckan_development.sh.override ./start_ckan_development.sh RUN chmod +x start_ckan_development.sh # Apply any patches needed to CKAN core or any of the built extensions (not the # runtime mounted ones!) -COPY patches patches +COPY patches ./ RUN for d in $APP_DIR/patches/*; do \ if [ -d $d ]; then \ diff --git a/ckan/Dockerfile.ghcr b/ckan/Dockerfile.ghcr index 899a2f11..caa06ca9 100644 --- a/ckan/Dockerfile.ghcr +++ b/ckan/Dockerfile.ghcr @@ -21,7 +21,7 @@ COPY docker-entrypoint.d/* docker-entrypoint.d/ COPY setup/who.ini ./ # Apply any patches needed to CKAN core -COPY patches patches +COPY patches ./ # Updated version of the Dockerfile RUN command that skips applying a patch if a reversed or previously applied patch is detected RUN for d in $APP_DIR/patches/*; do \ From 89610daec4084e775bed1fd17eb20dd56054ddbd Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Mon, 2 Oct 2023 07:41:16 +0000 Subject: [PATCH 2/3] Fix docker build context --- .github/workflows/docker-build.yml | 2 +- .github/workflows/docker-manual.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 1e1719fe..6142588a 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -58,7 +58,7 @@ jobs: push: true tags: ${{ env.TAG }} labels: ${{ steps.meta.outputs.labels }} - context: ${{ env.CONTEXT }} + context: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }} file: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }}/${{ env.DOCKERFILE }} - name: Linting Dockerfile with hadolint in GH Actions diff --git a/.github/workflows/docker-manual.yml b/.github/workflows/docker-manual.yml index 24ea7240..a88d6122 100644 --- a/.github/workflows/docker-manual.yml +++ b/.github/workflows/docker-manual.yml @@ -48,7 +48,7 @@ jobs: push: true tags: ${{ env.TAG }} labels: ${{ steps.meta.outputs.labels }} - context: ${{ env.CONTEXT }} + context: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }} file: ${{ env.CONTEXT }}${{ env.DOCKERFILE_PATH }}/${{ env.DOCKERFILE }} - name: Linting Dockerfile with hadolint in GH Actions From 8a599a11a4285eb15bb4f0e67bb680259f1cf080 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Mon, 2 Oct 2023 07:41:25 +0000 Subject: [PATCH 3/3] Fix Dockerfiles --- ckan/Dockerfile | 12 ++++++------ ckan/Dockerfile.dev | 4 ++-- ckan/Dockerfile.ghcr | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ckan/Dockerfile b/ckan/Dockerfile index 9bf9adc5..538933b2 100644 --- a/ckan/Dockerfile +++ b/ckan/Dockerfile @@ -9,7 +9,7 @@ ENV TZ=UTC WORKDIR ${APP_DIR} # requirements.txt files fixed until next releases -COPY req_fixes ./req_fixes +COPY req_fixes req_fixes # Extensions ### XLoader - 1.0.1 ### @@ -60,14 +60,14 @@ COPY docker-entrypoint.d/* /docker-entrypoint.d/ COPY setup/who.ini ./ # Apply any patches needed to CKAN core -COPY patches ./ +COPY patches 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 ; \ + 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 CMD ["/bin/sh", "-c", "$APP_DIR/start_ckan.sh"] \ No newline at end of file diff --git a/ckan/Dockerfile.dev b/ckan/Dockerfile.dev index 68c6ffb5..c87c3ad0 100644 --- a/ckan/Dockerfile.dev +++ b/ckan/Dockerfile.dev @@ -57,12 +57,12 @@ COPY docker-entrypoint.d/* docker-entrypoint.d/ COPY setup/who.ini ./ # Override start_ckan.sh with DEV sh -COPY setup/start_ckan_development.sh.override ./start_ckan_development.sh +COPY setup/start_ckan_development.sh.override start_ckan_development.sh RUN chmod +x start_ckan_development.sh # Apply any patches needed to CKAN core or any of the built extensions (not the # runtime mounted ones!) -COPY patches ./ +COPY patches patches RUN for d in $APP_DIR/patches/*; do \ if [ -d $d ]; then \ diff --git a/ckan/Dockerfile.ghcr b/ckan/Dockerfile.ghcr index caa06ca9..899a2f11 100644 --- a/ckan/Dockerfile.ghcr +++ b/ckan/Dockerfile.ghcr @@ -21,7 +21,7 @@ COPY docker-entrypoint.d/* docker-entrypoint.d/ COPY setup/who.ini ./ # Apply any patches needed to CKAN core -COPY patches ./ +COPY patches patches # Updated version of the Dockerfile RUN command that skips applying a patch if a reversed or previously applied patch is detected RUN for d in $APP_DIR/patches/*; do \