diff --git a/.github/workflows/master_merge.yml b/.github/workflows/master_merge.yml index 74af5af..bd8de38 100644 --- a/.github/workflows/master_merge.yml +++ b/.github/workflows/master_merge.yml @@ -29,10 +29,12 @@ jobs: - name: Cache Docker layers uses: actions/cache@v2 with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} + path: | + /tmp/.buildx-cache-alpine-2-9 + /tmp/.buildx-cache-ubuntu-2-9 + key: ${{ runner.os }}-buildx-2-9-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx + ${{ runner.os }}-buildx-2-9 - name: Get docker tag for Alpine image id: alpine @@ -48,8 +50,8 @@ jobs: tags: | keitaro/ckan:${{ steps.alpine.outputs.IMAGE_TAG }} ghcr.io/keitaroinc/ckan:${{ steps.alpine.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-alpine-2-9 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-alpine-2-9 - name: Get docker tag for Ubuntu image id: ubuntu @@ -65,8 +67,8 @@ jobs: tags: | keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }} ghcr.io/keitaroinc/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-ubuntu-2-9 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-ubuntu-2-9 build-ckan-2-8: runs-on: ubuntu-latest @@ -92,10 +94,12 @@ jobs: - name: Cache Docker layers uses: actions/cache@v2 with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} + path: | + /tmp/.buildx-cache-alpine-2-8 + /tmp/.buildx-cache-ubuntu-2-8 + key: ${{ runner.os }}-buildx-2-8-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx- + ${{ runner.os }}-buildx-2-8 - name: Get docker tag for Alpine image id: alpine @@ -111,8 +115,8 @@ jobs: tags: | keitaro/ckan:${{ steps.alpine.outputs.IMAGE_TAG }} ghcr.io/keitaroinc/ckan:${{ steps.alpine.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-alpine-2-8 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-alpine-2-8 - name: Get docker tag for Ubuntu image id: ubuntu @@ -128,8 +132,8 @@ jobs: tags: | keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }} ghcr.io/keitaroinc/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-ubuntu-2-8 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-ubuntu-2-8 build-ckan-2-7: runs-on: ubuntu-latest @@ -155,10 +159,12 @@ jobs: - name: Cache Docker layers uses: actions/cache@v2 with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} + path: | + /tmp/.buildx-cache-alpine-2-7 + /tmp/.buildx-cache-ubuntu-2-7 + key: ${{ runner.os }}-buildx-2-7-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx- + ${{ runner.os }}-buildx-2-7 - name: Get docker tag for Alpine image id: alpine @@ -174,8 +180,8 @@ jobs: tags: | keitaro/ckan:${{ steps.alpine.outputs.IMAGE_TAG }} ghcr.io/keitaroinc/ckan:${{ steps.alpine.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-alpine-2-7 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-alpine-2-7 - name: Get docker tag for Ubuntu image id: ubuntu @@ -191,8 +197,8 @@ jobs: tags: | keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }} ghcr.io/keitaroinc/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-ubuntu-2-7 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-ubuntu-2-7 build-ckan-datapusher: runs-on: ubuntu-latest @@ -218,10 +224,10 @@ jobs: - name: Cache Docker layers uses: actions/cache@v2 with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} + path: /tmp/.buildx-cache-datapusher + key: ${{ runner.os }}-buildx-datapusher-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx- + ${{ runner.os }}-buildx-datapusher - name: Get docker tag for datapusher image id: datapusher @@ -237,5 +243,5 @@ jobs: tags: | keitaro/datapusher:${{ steps.datapusher.outputs.IMAGE_TAG }} ghcr.io/keitaroinc/datapusher:${{ steps.datapusher.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-datapusher + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-datapusher diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 34a1665..092597c 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -16,10 +16,12 @@ jobs: - name: Cache Docker layers uses: actions/cache@v2 with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} + path: | + /tmp/.buildx-cache-alpine-2-9 + /tmp/.buildx-cache-ubuntu-2-9 + key: ${{ runner.os }}-buildx-2-9-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx + ${{ runner.os }}-buildx-2-9 - name: Get docker tag for Alpine image id: alpine @@ -33,8 +35,8 @@ jobs: file: ./images/ckan/2.9/Dockerfile push: false tags: keitaro/ckan:${{ steps.alpine.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-alpine-2-9 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-alpine-2-9 - name: Get docker tag for Ubuntu image id: ubuntu @@ -48,8 +50,8 @@ jobs: file: ./images/ckan/2.9/Dockerfile.focal push: false tags: keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-ubuntu-2-9 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-ubuntu-2-9 build-ckan-2-8: runs-on: ubuntu-latest @@ -62,10 +64,12 @@ jobs: - name: Cache Docker layers uses: actions/cache@v2 with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} + path: | + /tmp/.buildx-cache-alpine-2-8 + /tmp/.buildx-cache-ubuntu-2-8 + key: ${{ runner.os }}-buildx-2-8-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx- + ${{ runner.os }}-buildx-2-8 - name: Get docker tag for Alpine image id: alpine @@ -79,8 +83,8 @@ jobs: file: ./images/ckan/2.8/Dockerfile push: false tags: keitaro/ckan:${{ steps.alpine.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-alpine-2-8 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-alpine-2-8 - name: Get docker tag for Ubuntu image id: ubuntu @@ -94,8 +98,8 @@ jobs: file: ./images/ckan/2.8/Dockerfile.focal push: false tags: keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-ubuntu-2-8 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-ubuntu-2-8 build-ckan-2-7: runs-on: ubuntu-latest @@ -108,10 +112,12 @@ jobs: - name: Cache Docker layers uses: actions/cache@v2 with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} + path: | + /tmp/.buildx-cache-alpine-2-7 + /tmp/.buildx-cache-ubuntu-2-7 + key: ${{ runner.os }}-buildx-2-7-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx- + ${{ runner.os }}-buildx-2-7 - name: Get docker tag for Alpine image id: alpine @@ -125,8 +131,8 @@ jobs: file: ./images/ckan/2.7/Dockerfile push: false tags: keitaro/ckan:${{ steps.alpine.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-alpine-2-7 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-alpine-2-7 - name: Get docker tag for Ubuntu image id: ubuntu @@ -140,8 +146,8 @@ jobs: file: ./images/ckan/2.7/Dockerfile.focal push: false tags: keitaro/ckan:${{ steps.ubuntu.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-ubuntu-2-7 + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-ubuntu-2-7 build-ckan-datapusher: runs-on: ubuntu-latest @@ -154,10 +160,10 @@ jobs: - name: Cache Docker layers uses: actions/cache@v2 with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} + path: /tmp/.buildx-cache-datapusher + key: ${{ runner.os }}-buildx-datapusher-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx- + ${{ runner.os }}-buildx-datapusher - name: Get docker tag for datapusher image id: datapusher @@ -171,5 +177,5 @@ jobs: file: ./images/datapusher/Dockerfile push: false tags: keitaro/ckandatapusher:${{ steps.datapusher.outputs.IMAGE_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,mode=max,dest=/tmp/.buildx-cache + cache-from: type=local,src=/tmp/.buildx-cache-datapusher + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-datapusher diff --git a/Readme.md b/Readme.md index 2ef79ae..74f0b75 100644 --- a/Readme.md +++ b/Readme.md @@ -15,7 +15,11 @@ and Github Container Registry: Looking to run CKAN on Kubernetes? Check out our [CKAN Helm Chart](https://github.com/keitaroinc/ckan-helm)! ## Overview -All images are based on [Alpine Linux](https://alpinelinux.org/) and include only required extensions to start a CKAN instance. The docker images are built using a multi-stage docker approach in order to produce slim production grade docker images with the right libraries and configuration. This multi-stage approach allows us to build python binary wheels in the build stages that later on we install in the main stage. +Images are provided in two flavors: +- [Alpine Linux](https://alpinelinux.org/) based images +- [Ubuntu Focal](https://ubuntu.com/) based images are the ones ending with `-focal` in the tag name + +The Docker containers include only the required extensions to start a CKAN instance. The docker images are built using a multi-stage docker approach in order to produce slim production grade docker images with the right libraries and configuration. This multi-stage approach allows us to build python binary wheels in the build stages that later on we install in the main stage. Directory layout: - [compose](./compose) - contains a docker-compose setup allowing users to spin up a CKAN setup easily using [docker-compose](https://docs.docker.com/compose/)