fix(action): Proxy rootful/rootless Docker sockets #83
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The GitHub Actions runner hard-codes the Docker socket to
unix:///var/run/docker.sock
. It is no longer possible to reliably run the rootful and rootless Docker daemons concurrently now that they each check that they are the only daemon running. Hence, proxy bidirectionally between the rootful and rootless (unix://$XDG_RUNTIME_DIR/docker.sock
) Docker sockets rather than attempt to start the rootful Docker daemon back up. Don't close the rootful Docker socket so that it can be proxied.Don't set environment variables early. The rootless Docker install script recommends setting some environment variables after it's run. Setting
XDG_RUNTIME_DIR
in particular before the script has run prevents it from automatically creating~/.docker/run
whenXDG_RUNTIME_DIR
is unset. Hence, wait until the script has run to set these environment variables. While the commands to set these environment variables still take place before the install script is run, they will not be sourced by the GitHub Actions runner until the subsequent workflow step runs.Make a workflow step name more descriptive. Clarify that the step stops the rootful, not rootless, Docker daemon.