From d22a1592f6777c281bcd21e46a688cf1770b210d Mon Sep 17 00:00:00 2001 From: Maicol Battistini Date: Mon, 19 Aug 2024 16:09:01 +0200 Subject: [PATCH] fix: Docker compatibility with ARM SoCs --- README.md | 4 ++-- compose/2.10/Dockerfile | 4 ++-- compose/2.10/docker-compose.yml | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0622588..437e166 100644 --- a/README.md +++ b/README.md @@ -94,9 +94,9 @@ You can add scripts to CKAN custom images and copy them to the *docker-afterinit ## Build To build a CKAN image run: ```sh -docker build --tag ghcr.io/keitaroinc/ckan:2.9.9 images/ckan/2.9 +DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build --tag d4science-ckan:2.10.4-focal images/ckan/2.10 ``` -The –-tag ghcr.io/keitaroinc/ckan:2.9.9 flag sets the image name to ghcr.io/keitaroinc/ckan:2.9.9 and 'images/ckan/2.9' at the end tells docker build to use the context into the specified directory where the Dockerfile and related contents are. +The `–-tag d4science-ckan:2.10.4-focal` flag sets the image name to d4science-ckan:2.10.4-focal and 'images/ckan/2.10' at the end tells docker build to use the context into the specified directory where the Dockerfile and related contents are. ## Upload to DockerHub >*It's recommended to upload built images to DockerHub* diff --git a/compose/2.10/Dockerfile b/compose/2.10/Dockerfile index e5411d9..c9e9ac5 100644 --- a/compose/2.10/Dockerfile +++ b/compose/2.10/Dockerfile @@ -1,7 +1,7 @@ ################### ### Extensions ################### -FROM registry.trust-itservices.com/d4science/ckan-docker/ckan:2.10.4-focal as extbuild +FROM d4science-ckan:2.10.4-focal as extbuild # Switch to the root user USER root @@ -13,7 +13,7 @@ RUN apt-get install python3-dev python3-pip libxml2-dev libxslt1-dev libgeos-c1v ############ ### MAIN ############ -FROM registry.trust-itservices.com/d4science/ckan-docker/ckan:2.10.4-focal +FROM d4science-ckan:2.10.4-focal # Add the custom extensions to the plugins list ENV CKAN__PLUGINS envvars image_view text_view recline_view datastore datapusher spatial_metadata spatial_query d4science d4science_theme diff --git a/compose/2.10/docker-compose.yml b/compose/2.10/docker-compose.yml index 8288623..b8c889e 100644 --- a/compose/2.10/docker-compose.yml +++ b/compose/2.10/docker-compose.yml @@ -8,6 +8,7 @@ volumes: services: ckan: + platform: linux/amd64 container_name: ckan build: context: . @@ -38,6 +39,7 @@ services: - ./docker-entrypoint.d:/srv/app/docker-entrypoint.d datapusher: + platform: linux/amd64 container_name: datapusher image: ghcr.io/keitaroinc/datapusher:${DATAPUSHER_VERSION} networks: @@ -56,6 +58,7 @@ services: db: + platform: linux/amd64 container_name: db build: context: . @@ -77,6 +80,7 @@ services: solr: container_name: solr image: ckan/ckan-solr:2.10-solr9-spatial + platform: linux/amd64 networks: - backend env_file: @@ -89,6 +93,7 @@ services: - ${PWD}/solr8/ckan_init_solr.sh:/docker-entrypoint-initdb.d/ckan_init_solr.sh redis: + platform: linux/amd64 container_name: redis image: redis:${REDIS_VERSION} networks: