Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --docker-socket-path flag to the local execute command #868

Merged
merged 1 commit into from
May 4, 2023
Merged

Add --docker-socket-path flag to the local execute command #868

merged 1 commit into from
May 4, 2023

Conversation

chiting
Copy link
Contributor

@chiting chiting commented Mar 16, 2023

Checklist

=========

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked for similar issues and haven't found anything relevant.
  • This is not a security issue (which should be reported here: https://circleci.com/security/)
  • I have read Contribution Guidelines.

Internal Checklist

  • I am requesting a review from my own team as well as the owning team
  • I have a plan in place for the monitoring of the changes that I am making (this can include new monitors, logs to be aware of, etc...)

Changes

=======

  • Add --docker-socket-path flag to the execute local command

Rationale

=========

When using Podman in rootless mode, the socket is located in a different path. It usually is in /var/run/user/<user-id>/podman/podman.sock. Because the local execute has the host's docker socket hard coded to /var/run/docker.sock, it's not possible to mount it in the Picard container if the path differs.

Please note if you want to test it with podman, it will still error because further down the execution, the circleci agent in the Picard container will try and create a network name with a / (forward-slash) in it, which is not a valid network name for Podman. This is not a bug on this side as it works with docker, so an issue has been raised already in Podman's repository.

Considerations

==============

Didn't add the environment and config file part as I wanted to know if the idea of adding such new flag is something you'd accept first before putting more work into it.

Screenshots

============

Before

Image or [gif](https://giphy.com/apps/giphycapture)

After

Image or gif where change can be clearly seen

Here are some helpful tips you can follow when submitting a pull request:

  1. Fork the repository and create your branch from main.
  2. Run make build in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (make test).
  5. The --debug flag is often helpful for debugging HTTP client requests and responses.
  6. Format your code with gofmt.
  7. Make sure your code lints (make lint). Note: This requires Docker to run inside a local job.

@chiting chiting requested a review from a team as a code owner March 16, 2023 18:20
@JulesFaucherre JulesFaucherre merged commit bfe5c99 into CircleCI-Public:develop May 4, 2023
@chiting chiting deleted the add-docker-socket-config branch May 10, 2023 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants