container.options causes a docker network issue #195

Closed
opened 2023-05-18 09:16:12 +00:00 by Yedrimas · 2 comments

Hello,

It seems newer version have an issue when using the container.options. As soon as it is not empty, I'm getting a
Error response from daemon: container sharing network namespace with another container or host cannot be connected to any other network

I'm using the docker image : gitea/act_runner

Here is the config I'm trying to use :

container:
  # Which network to use for the job containers. Could be bridge, host, none, or the name of a custom network.
  network_mode: bridge
  # Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
  privileged: false
  # And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
  options: --volume /repo:/repo
  # The parent directory of a job's working directory.
  # If it's empty, /workspace will be used.
  workdir_parent:

0.1.5 : No issue 👍
0.1.6 : No issue 👍
0.1.7 : Network error
0.1.8 : Network error

Hello, It seems newer version have an issue when using the `container.options`. As soon as it is not empty, I'm getting a `Error response from daemon: container sharing network namespace with another container or host cannot be connected to any other network` I'm using the docker image : `gitea/act_runner` Here is the config I'm trying to use : ```yaml container: # Which network to use for the job containers. Could be bridge, host, none, or the name of a custom network. network_mode: bridge # Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker). privileged: false # And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway). options: --volume /repo:/repo # The parent directory of a job's working directory. # If it's empty, /workspace will be used. workdir_parent: ``` `0.1.5` : No issue 👍 `0.1.6` : No issue 👍 `0.1.7` : Network error `0.1.8` : Network error
Yedrimas changed title from network issue to container.options causes a docker network issue 2023-05-18 09:18:01 +00:00
Member

Could you update your runner to latest version (gitea/act_runner:nightly) and try again?
Here are some PRs related, the issue shoud be fixed:

Could you update your runner to latest version (`gitea/act_runner:nightly`) and try again? Here are some PRs related, the issue shoud be fixed: - https://gitea.com/gitea/act_runner/pulls/184 - https://gitea.com/gitea/act/pulls/56
Author

Hello,

With version version:0.1.8+5-g84386c1 (nightly as the time of writing this) this works flawlessly.
(And of course, updating config to

container:
  # Which network to use for the job containers. Could be bridge, host, none, or the name of a custom network.
  network: 
  # Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
  privileged: false
  # And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
  options: --volume /repo:/repo
  # The parent directory of a job's working directory.
  # If it's empty, /workspace will be used.
  workdir_parent:

)
Thanks!

Hello, With version `version:0.1.8+5-g84386c1` (nightly as the time of writing this) this works flawlessly. (And of course, updating config to ```yaml container: # Which network to use for the job containers. Could be bridge, host, none, or the name of a custom network. network: # Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker). privileged: false # And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway). options: --volume /repo:/repo # The parent directory of a job's working directory. # If it's empty, /workspace will be used. workdir_parent: ``` ) Thanks!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
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: gitea/act_runner#195
No description provided.