Skip to content

Commit

Permalink
CI: add nerdctl
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Apr 10, 2024
1 parent a7a8b24 commit 0a7700b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
engine: [docker, podman]
engine: [docker, nerdctl, podman]
env:
CONTAINER_ENGINE: "${{ matrix.engine }}"
steps:
Expand All @@ -37,6 +37,12 @@ jobs:
sudo rm -rf /var/run/docker*
dockerd-rootless-setuptool.sh install
docker info
- name: Set up Rootless nerdctl
if: ${{ matrix.engine == 'nerdctl' }}
run: |
set -eux -o pipefail
sudo ./init-host/init-host.root.d/install-nerdctl.sh
nerdctl info
- name: Set up Rootless Podman
if: ${{ matrix.engine == 'podman' }}
run: |
Expand Down Expand Up @@ -69,6 +75,8 @@ jobs:
include:
- lxc-image: ubuntu:22.04
engine: docker
- lxc-image: ubuntu:22.04
engine: nerdctl
- lxc-image: images:fedora/39/cloud
engine: podman
env:
Expand Down
6 changes: 3 additions & 3 deletions init-host/init-host.root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ case "${CONTAINER_ENGINE}" in
fi
systemctl disable --now docker
;;
"podman")
if ! command -v podman >/dev/null 2>&1; then
"${script_dir}"/init-host.root.d/install-podman.sh
"podman" | "nerdctl")
if ! command -v "${CONTAINER_ENGINE}" >/dev/null 2>&1; then
"${script_dir}"/init-host.root.d/install-"${CONTAINER_ENGINE}".sh
fi
;;
*)
Expand Down
5 changes: 5 additions & 0 deletions init-host/init-host.rootless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ case "${CONTAINER_ENGINE}" in
"docker")
dockerd-rootless-setuptool.sh install
;;
"nerdctl")
containerd-rootless-setuptool.sh install
containerd-rootless-setuptool.sh install-buildkit-containerd
containerd-rootless-setuptool.sh install-bypass4netnsd
;;
"podman")
systemctl --user enable --now podman-restart
;;
Expand Down

0 comments on commit 0a7700b

Please sign in to comment.