Skip to content

Commit

Permalink
Use specific compatible Docker/Compose version for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aequitas committed Jun 14, 2024
1 parent 9c11754 commit ba377b6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 22 deletions.
64 changes: 42 additions & 22 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,22 +250,15 @@ jobs:
integration-test:
needs: [build-docker]

# Due to some changes in the handling of config files in Compose, some configurations might not work
# on older or newer versions of Docker/Compose. Use a matrix to test both.
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
runs-on: ubuntu-24.04

env:
# used in `docker-compose.yml` files to determine version of images to pull
RELEASE: "${{ needs.build-docker.outputs.internetnl_version }}"
PY_COLORS: "1"

steps:
- if: matrix.os == 'ubuntu-24.04'
name: Upgrade to at least Docker 26.1.3 to fix DNS issues
- name: Install specific Docker/Compose versions that are known to work
run: |
# install Docker apt repository
sudo apt update
Expand All @@ -280,7 +273,7 @@ jobs:
sudo apt-get update
# upgrade Docker
sudo apt install --upgrade docker-ce docker-compose-plugin
sudo apt install --upgrade docker-ce docker-compose-plugin=2.27.0\*
- name: Debug info
run: |
Expand Down Expand Up @@ -412,14 +405,31 @@ jobs:

test:
needs: [build-docker]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

env:
# used in `docker-compose.yml` files to determine version of images to pull
RELEASE: "${{ needs.build-docker.outputs.internetnl_version }}"
PY_COLORS: "1"

steps:
- name: Install specific Docker/Compose versions that are known to work
run: |
# install Docker apt repository
sudo apt update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
# upgrade Docker
sudo apt install --upgrade docker-ce docker-compose-plugin=2.27.0\*
- name: Debug info
run: |
docker version --format '{{.Server.Version}}'
Expand Down Expand Up @@ -470,13 +480,30 @@ jobs:

development-environment-test:
needs: [build-docker]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

env:
# used in `docker-compose.yml` files to determine version of images to pull
RELEASE: "${{ needs.build-docker.outputs.internetnl_version }}"

steps:
- name: Install specific Docker/Compose versions that are known to work
run: |
# install Docker apt repository
sudo apt update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
# upgrade Docker
sudo apt install --upgrade docker-ce docker-compose-plugin=2.27.0\*
- name: Debug info
run: |
docker version --format '{{.Server.Version}}'
Expand Down Expand Up @@ -557,22 +584,15 @@ jobs:
batch-integration-test:
needs: [build-docker]

# Due to some changes in the handling of config files in Compose, some configurations might not work
# on older or newer versions of Docker/Compose. Use a matrix to test both.
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
runs-on: ubuntu-24.04

env:
# used in `docker-compose.yml` files to determine version of images to pull
RELEASE: "${{ needs.build-docker.outputs.internetnl_version }}"
PY_COLORS: "1"

steps:
- if: matrix.os == 'ubuntu-24.04'
name: Upgrade to at least Docker 26.1.3 to fix DNS issues
- name: Install specific Docker/Compose versions that are known to work
run: |
# install Docker apt repository
sudo apt update
Expand All @@ -587,7 +607,7 @@ jobs:
sudo apt-get update
# upgrade Docker
sudo apt install --upgrade docker-ce docker-compose-plugin
sudo apt install --upgrade docker-ce docker-compose-plugin=2.27.0\*
- name: Debug info
run: |
Expand Down
2 changes: 2 additions & 0 deletions documentation/Docker-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ At time of writing the latest Colima version (`v0.6.9`) does not yet contain the

colima ssh -- sudo /bin/sh -c 'apt update; apt install --upgrade docker-ce'

**notice**: Docker Compose Plugin versions from `2.24` up to `2.27.0` should be avoided. `2.27.0` is supported but `2.27.1` is not. At the time a newer version which is supported is to be released.

**notice**: your Docker runtime should be configured with enough memory and CPU, otherwise the environment will be unstable. Minimum is at least 4GB memory and 2 CPU cores, more is better for quicker rebuild/restart of images/containers.

**for arm users (eg apple m1)**: nassl will not compile on x64 architectures, so use the option to start your container engine in x86 mode. For colima this can be done with `colima start --arch x86_64`. As per the system requirements noted above, the right way to start with colima would then be: `colima start --arch x86_64 --cpu 2 --memory 4`, but giving it some room would make that: `colima start --arch x86_64 --cpu 4 --memory 8`.
Expand Down

0 comments on commit ba377b6

Please sign in to comment.