Skip to content

Commit 8c21e43

Browse files
authored
Disable containerd for docker compose running in GHA (#140)
1 parent d9a956d commit 8c21e43

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

action.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,22 @@ inputs:
3131
runs:
3232
using: "composite"
3333
steps:
34+
- name: Disable containerd image store
35+
shell: bash
36+
run: |
37+
DAEMON_JSON="/etc/docker/daemon.json"
38+
if [ -f "$DAEMON_JSON" ]; then
39+
sudo jq '. + {"features": {"containerd-snapshotter": false}}' "$DAEMON_JSON" \
40+
| sudo tee "${DAEMON_JSON}.tmp" > /dev/null
41+
sudo mv "${DAEMON_JSON}.tmp" "$DAEMON_JSON"
42+
else
43+
echo '{"features": {"containerd-snapshotter": false}}' \
44+
| sudo tee "$DAEMON_JSON" > /dev/null
45+
fi
46+
sudo systemctl restart docker
47+
docker version
48+
docker info
49+
echo "DOCKER_API_VERSION=$(docker version --format '{{.Server.APIVersion}}')" >> "$GITHUB_ENV"
3450
- name: Install docker-compose
3551
shell: bash
3652
if: runner.os != 'Windows'

0 commit comments

Comments
 (0)