Closed meeDamian closed 10 months ago
The —privileged flag is heavily dependent on the configuration of the underlying docker daemon and depending on the configuration for the particular runner it may or may not work.
do you have any update? it would be very useful to pass down the --privileged option
Hello guys,
I'm having the same issue. I have a docker container that is used as an build environment but need --privileged
mode to be enabled.. Too bad, I cannot used GitHub actions and used this container to build other projects that needs it..
I will try to find another solution..
This behavior is very much needed. Currently a deal breaker for some of our CI systems.
OK, just figured this out!
You need to add an "options: --privileged" to the CI yml under your container.
You need to add an "options: --privileged" to the CI yml under your container.
Can you show an example of this in context?
@ianfixes yep, sure thing.
smoke:
name: Smoke Test MAX32665
needs: [load, ci-image]
runs-on: [self-hosted, linux, x64]
# Run inside this container
container:
image: <docker image name>
credentials:
username: _json_key
password: ${{ secrets.GCR_DEVOPS_SERVICE_ACCOUNT_KEY }}
options: --privileged
steps:
- name: Check out the repo
uses: actions/checkout@v2
Hello! Apologies for the delay in responding to this issue. It looks like @brad-natelborg provided a solution for running a container in privileged mode within a workflow run :)
Regarding creating a container based action with the same configuration, as @chrispat mentioned, this is heavily dependent on the underlying docker daemon.
I am going to go ahead and close this out for the time being, but if there are additional questions please feel free to reopen!
@brad-natelborg where do I specify this for a job which only uses
a container in one step?
(This is for “slim” containers where the normal checkout action cannot run in the container because it has no nodejs.)
I want to setup a CPU emulation action for Docker, however I can't currently do that due to the lack of access to this flag.