Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:

docker_builds:
Expand All @@ -27,44 +24,65 @@ jobs:
- name: alpine-small-amd64
image_name: alpine-small
arch: amd64
gha_image: ubuntu-latest

- name: alpine-normal-amd64
image_name: alpine-small
arch: amd64
gha_image: ubuntu-latest

- name: ubuntu-small-amd64
image_name: ubuntu-small
arch: amd64
gha_image: ubuntu-latest

- name: ubuntu-small-arm64
image_name: ubuntu-small
arch: arm64
gha_image: ubuntu-24.04-arm

- name: ubuntu-full-amd64-proprietary-sdks
image_name: ubuntu-full
arch: amd64
gha_image: ubuntu-latest

- name: ubuntu-full-arm64
image_name: ubuntu-full
arch: arm64
gha_image: ubuntu-24.04-arm

name: ${{ matrix.name }}

runs-on: ubuntu-latest
runs-on: ${{ matrix.gha_image }}
permissions:
contents: read
attestations: write
packages: write
id-token: write

steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Docker
uses: docker/setup-docker-action@v4
with:
daemon-config: |
{
"debug": false,
"features": {
"containerd-snapshotter": true
}
}

- name: Build
shell: bash -l {0}
run: |
docker run --rm --privileged linuxkit/binfmt:v0.8
docker run --rm --platform linux/amd64 --privileged linuxkit/binfmt:v0.8
cd docker/${{ matrix.image_name }}
if test "${{ matrix.name }}" = "ubuntu-full-amd64-proprietary-sdks"; then
./build.sh --platform linux/${{ matrix.arch }} --with-oracle --with-mrsid --with-ecw
./build.sh --platform linux/${{ matrix.arch }} --with-multi-arch --with-oracle --with-mrsid --with-ecw
else
./build.sh --platform linux/${{ matrix.arch }}
./build.sh --platform linux/${{ matrix.arch }} --with-multi-arch
fi
docker run --rm ghcr.io/osgeo/gdal:${{ matrix.image_name }}-latest-${{ matrix.arch }} gdalinfo --formats
docker run --rm ghcr.io/osgeo/gdal:${{ matrix.image_name }}-latest-${{ matrix.arch }} ogrinfo --formats
7 changes: 3 additions & 4 deletions docker/alpine-normal/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ if test "${HAS_PLATFORM}" = "0" -a "${HAS_RELEASE}" = "0" -a "x${TARGET_IMAGE}"
DOCKER_REPO=$(cat /tmp/gdal_docker_repo.txt)

docker manifest rm ${DOCKER_REPO}/${TARGET_IMAGE}-latest || /bin/true
docker manifest create ${DOCKER_REPO}/${TARGET_IMAGE}-latest \
--amend ${DOCKER_REPO}/${TARGET_IMAGE}-latest-amd64 \
--amend ${DOCKER_REPO}/${TARGET_IMAGE}-latest-arm64
docker manifest push ${DOCKER_REPO}/${TARGET_IMAGE}-latest
docker buildx imagetools create -t ${DOCKER_REPO}/${TARGET_IMAGE}-latest \
${DOCKER_REPO}/${TARGET_IMAGE}-latest-amd64 \
${DOCKER_REPO}/${TARGET_IMAGE}-latest-arm64
fi
fi
7 changes: 3 additions & 4 deletions docker/alpine-small/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ if test "${HAS_PLATFORM}" = "0" -a "${HAS_RELEASE}" = "0" -a "x${TARGET_IMAGE}"
DOCKER_REPO=$(cat /tmp/gdal_docker_repo.txt)

docker manifest rm ${DOCKER_REPO}/${TARGET_IMAGE}-latest || /bin/true
docker manifest create ${DOCKER_REPO}/${TARGET_IMAGE}-latest \
--amend ${DOCKER_REPO}/${TARGET_IMAGE}-latest-amd64 \
--amend ${DOCKER_REPO}/${TARGET_IMAGE}-latest-arm64
docker manifest push ${DOCKER_REPO}/${TARGET_IMAGE}-latest
docker buildx imagetools create -t ${DOCKER_REPO}/${TARGET_IMAGE}-latest \
${DOCKER_REPO}/${TARGET_IMAGE}-latest-amd64 \
${DOCKER_REPO}/${TARGET_IMAGE}-latest-arm64
fi
fi
14 changes: 6 additions & 8 deletions docker/ubuntu-full/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,13 @@ if test "${HAS_PLATFORM}" = "0" -a "${HAS_RELEASE}" = "0" -a "x${TARGET_IMAGE}"
DOCKER_REPO=$(cat /tmp/gdal_docker_repo.txt)

docker manifest rm ${DOCKER_REPO}/${TARGET_IMAGE}-latest || /bin/true
docker manifest create ${DOCKER_REPO}/${TARGET_IMAGE}-latest \
--amend ${DOCKER_REPO}/${TARGET_IMAGE}-latest-amd64 \
--amend ${DOCKER_REPO}/${TARGET_IMAGE}-latest-arm64
docker manifest push ${DOCKER_REPO}/${TARGET_IMAGE}-latest
docker buildx imagetools create -t ${DOCKER_REPO}/${TARGET_IMAGE}-latest \
${DOCKER_REPO}/${TARGET_IMAGE}-latest-amd64 \
${DOCKER_REPO}/${TARGET_IMAGE}-latest-arm64

docker manifest rm ${DOCKER_REPO}/osgeo/gdal || /bin/true
docker manifest create ${DOCKER_REPO}/osgeo/gdal \
--amend ${DOCKER_REPO}/osgeo/gdal:ubuntu-full-latest-amd64 \
--amend ${DOCKER_REPO}/osgeo/gdal:ubuntu-full-latest-arm64
docker manifest push ${DOCKER_REPO}/osgeo/gdal
docker buildx imagetools create -t ${DOCKER_REPO}/osgeo/gdal \
${DOCKER_REPO}/osgeo/gdal:ubuntu-full-latest-amd64 \
${DOCKER_REPO}/osgeo/gdal:ubuntu-full-latest-arm64
fi
fi
7 changes: 3 additions & 4 deletions docker/ubuntu-small/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ if test "${HAS_PLATFORM}" = "0" -a "${HAS_RELEASE}" = "0" -a "x${TARGET_IMAGE}"
DOCKER_REPO=$(cat /tmp/gdal_docker_repo.txt)

docker manifest rm ${DOCKER_REPO}/${TARGET_IMAGE}-latest || /bin/true
docker manifest create ${DOCKER_REPO}/${TARGET_IMAGE}-latest \
--amend ${DOCKER_REPO}/${TARGET_IMAGE}-latest-amd64 \
--amend ${DOCKER_REPO}/${TARGET_IMAGE}-latest-arm64
docker manifest push ${DOCKER_REPO}/${TARGET_IMAGE}-latest
docker buildx imagetools create -t ${DOCKER_REPO}/${TARGET_IMAGE}-latest \
${DOCKER_REPO}/${TARGET_IMAGE}-latest-amd64 \
${DOCKER_REPO}/${TARGET_IMAGE}-latest-arm64
fi
fi
Loading