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

Allow to adjust mount options in Makefile #3137

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

wilfriedroset
Copy link
Collaborator

@wilfriedroset wilfriedroset commented Oct 5, 2022

What this PR does

Depending on how docker is installed and configured but also the hardening applied to the workstation, docker might not be able to mount the code base properly in the container. As such, the user could end up with a error similar to the following:

❯ make lint
--8<--
>>>> Entering build container: lint-packaging-scripts
time docker run --rm --tty -i -v ~/.ssh/:/root/.ssh:delegated,z -v /workspace/github.com/grafana/mimir/.cache:/go/cache:delegated,z -v /workspace/github.com/grafana/mimir/.pkg:/go/pkg:delegated,z -v /workspace/github.com/grafana/mimir:/go/src/github.com/grafana/mimir:delegated,z grafana/mimir-build-image GOOS=darwin GOARCH=amd64 BINARY_SUFFIX="" lint-packaging-scripts;
Error: error preparing container 9c7c78b35ac936b65510dec180a81f6f38ea98e027d7049012f73f7ac31f885d for attach: lsetxattr /workspace/github.com/grafana/mimir/.cache: operation not supported

real    0m0,719s
user    0m0,046s
sys     0m0,021s

This error could also be trigger when using podman as an alternative for docker.

See: containers/podman#13631

Which issue(s) this PR fixes or relates to

N/A

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

I'm not sure where to add this information in CHANGELOG.md, I will update the PR to follow your instruction.

Depending on how docker is installed and configured but also the
hardening applied to the workstation, docker might not be able to mount
the code base properly in the container. As such, the user could end up
with a error similar to the following:

```
❯ make lint
--8<--
>>>> Entering build container: lint-packaging-scripts
time docker run --rm --tty -i -v ~/.ssh/:/root/.ssh:delegated,z -v /workspace/github.com/grafana/mimir/.cache:/go/cache:delegated,z -v /workspace/github.com/grafana/mimir/.pkg:/go/pkg:delegated,z -v /workspace/github.com/grafana/mimir:/go/src/github.com/grafana/mimir:delegated,z grafana/mimir-build-image GOOS=darwin GOARCH=amd64 BINARY_SUFFIX="" lint-packaging-scripts;
Error: error preparing container 9c7c78b35ac936b65510dec180a81f6f38ea98e027d7049012f73f7ac31f885d for attach: lsetxattr /workspace/github.com/grafana/mimir/.cache: operation not supported

real    0m0,719s
user    0m0,046s
sys     0m0,021s
```

This error could also be trigger when using podman as an alternative for
docker.

See: containers/podman#13631

Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
@wilfriedroset wilfriedroset requested review from osg-grafana and a team as code owners October 5, 2022 18:55
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pracucci pracucci merged commit 69edc1b into grafana:main Oct 6, 2022
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.

None yet

2 participants