[GH-ISSUE #1309] Support containerd #710

Closed
opened 2026-03-01 21:45:43 +03:00 by kerem · 7 comments
Owner

Originally created by @marcofranssen on GitHub (Aug 18, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1309

Act version

0.2.30

Feature description

It would be great if act could also use containerd.

I have tried to use containerd locally by specifying the following.

In my .bashrc I defined an alias for docker.

alias docker=nerdctl

I also try to use the containerd socket.

$ act --container-daemon-socket /run/k3s/containerd/containerd.sock -j test-job
ERRO[0000] failed to obtain container engine info: error during connect: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info": EOF 
[Test my action/Check dist] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-22.04
[Test my action/Check dist]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-22.04 platform= username= forcePull=false
[Test my action/Check dist] unable to get git repo: section "remote \"origin\"" does not exist
Error: Error occurred running finally: Error occurred running finally: failed to list containers: error during connect: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&limit=0": EOF (original error: <nil>) (original error: unable to determine if image already exists for image 'ghcr.io/catthehacker/ubuntu:act-22.04' (): error during connect: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/json?filter=ghcr.io%2Fcatthehacker%2Fubuntu%3Aact-22.04": EOF)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Getting containerd up and running locally is quite easy by using. Rancher Desktop in case someone knows how to build the support for this.

Originally created by @marcofranssen on GitHub (Aug 18, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1309 ### Act version 0.2.30 ### Feature description It would be great if `act` could also use `containerd`. I have tried to use `containerd` locally by specifying the following. In my `.bashrc` I defined an alias for docker. ```shell alias docker=nerdctl ``` I also try to use the `containerd` socket. ```shell $ act --container-daemon-socket /run/k3s/containerd/containerd.sock -j test-job ERRO[0000] failed to obtain container engine info: error during connect: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info": EOF [Test my action/Check dist] 🚀 Start image=ghcr.io/catthehacker/ubuntu:act-22.04 [Test my action/Check dist] 🐳 docker pull image=ghcr.io/catthehacker/ubuntu:act-22.04 platform= username= forcePull=false [Test my action/Check dist] unable to get git repo: section "remote \"origin\"" does not exist Error: Error occurred running finally: Error occurred running finally: failed to list containers: error during connect: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json?all=1&limit=0": EOF (original error: <nil>) (original error: unable to determine if image already exists for image 'ghcr.io/catthehacker/ubuntu:act-22.04' (): error during connect: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/json?filter=ghcr.io%2Fcatthehacker%2Fubuntu%3Aact-22.04": EOF) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` Getting containerd up and running locally is quite easy by using. Rancher Desktop in case someone knows how to build the support for this.
kerem 2026-03-01 21:45:43 +03:00
Author
Owner

@catthehacker commented on GitHub (Aug 27, 2022):

https://github.com/nektos/act/wiki/Custom-container-engine

<!-- gh-comment-id:1229309176 --> @catthehacker commented on GitHub (Aug 27, 2022): https://github.com/nektos/act/wiki/Custom-container-engine
Author
Owner

@marcofranssen commented on GitHub (Aug 29, 2022):

Would a PR be accepted, maybe if someone in the community finds time to implement it?

I might also give it a shot if I can find some time.

For reference.

probably make a new package within pkg/container/containerd and move the existing logic into pkg/container/docker.

<!-- gh-comment-id:1229926236 --> @marcofranssen commented on GitHub (Aug 29, 2022): Would a PR be accepted, maybe if someone in the community finds time to implement it? I might also give it a shot if I can find some time. For reference. - https://github.com/containerd/containerd/blob/main/client.go probably make a new package within `pkg/container/containerd` and move the existing logic into `pkg/container/docker`.
Author
Owner

@KnisterPeter commented on GitHub (Aug 29, 2022):

Sure, go ahead

<!-- gh-comment-id:1229953904 --> @KnisterPeter commented on GitHub (Aug 29, 2022): Sure, go ahead
Author
Owner

@marcofranssen commented on GitHub (Oct 7, 2022):

Could we leave the issue open for visibility so there is a higher chance someone will pick it up?

<!-- gh-comment-id:1271725649 --> @marcofranssen commented on GitHub (Oct 7, 2022): Could we leave the issue open for visibility so there is a higher chance someone will pick it up?
Author
Owner

@shotarok commented on GitHub (Dec 4, 2022):

@marcofranssen

Rancher Desktop in case someone knows how to build the support for this.

This might not be exactly what I looked for. I could run act with Rancher Desktop (v1.6.2) on my MacBook Pro (Apple M1 Pro) like below:

  1. Change container engine to 'dockerd (moby)' from Rancher Desktop Preference
  2. DOCKER_HOST=unix://$HOME/.rd/docker.sock act ... --container-architecture linux/amd64
<!-- gh-comment-id:1336476025 --> @shotarok commented on GitHub (Dec 4, 2022): @marcofranssen > Rancher Desktop in case someone knows how to build the support for this. This might not be exactly what I looked for. I could run act with Rancher Desktop (v1.6.2) on my MacBook Pro (Apple M1 Pro) like below: 1. Change container engine to 'dockerd (moby)' from Rancher Desktop Preference 2. `DOCKER_HOST=unix://$HOME/.rd/docker.sock act ... --container-architecture linux/amd64`
Author
Owner

@marcofranssen commented on GitHub (Dec 5, 2022):

@marcofranssen

Rancher Desktop in case someone knows how to build the support for this.

This might not be exactly what I looked for. I could run act with Rancher Desktop (v1.6.2) on my MacBook Pro (Apple M1 Pro) like below:

  1. Change container engine to 'dockerd (moby)' from Rancher Desktop Preference
  2. DOCKER_HOST=unix://$HOME/.rd/docker.sock act ... --container-architecture linux/amd64

@shotarok sure with Moby it works, but the whole point was to support containerd, so I don't have to switch just for act.

<!-- gh-comment-id:1336970488 --> @marcofranssen commented on GitHub (Dec 5, 2022): > @marcofranssen > > > Rancher Desktop in case someone knows how to build the support for this. > > This might not be exactly what I looked for. I could run act with Rancher Desktop (v1.6.2) on my MacBook Pro (Apple M1 Pro) like below: > > 1. Change container engine to 'dockerd (moby)' from Rancher Desktop Preference > 2. `DOCKER_HOST=unix://$HOME/.rd/docker.sock act ... --container-architecture linux/amd64` @shotarok sure with Moby it works, but the whole point was to support containerd, so I don't have to switch just for act.
Author
Owner

@robertgzr commented on GitHub (Feb 2, 2023):

@marcofranssen maybe try out https://github.com/afbjorklund/nerdctld, haven't checked if it implements the api surface that act needs though: https://github.com/afbjorklund/nerdctld#implemented-commands

<!-- gh-comment-id:1413474645 --> @robertgzr commented on GitHub (Feb 2, 2023): @marcofranssen maybe try out https://github.com/afbjorklund/nerdctld, haven't checked if it implements the api surface that `act` needs though: https://github.com/afbjorklund/nerdctld#implemented-commands
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#710
No description provided.