rust-lang / rust-lang/docker-rust
`cargo install` reports permission denied
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 537
- Forks
- 111
- Avg merge
- 1d 38m
- Merged PRs (30d)
- 4
Description
Problem
My docker container is running the build step, i.e. cargo install --path . and reports an unwrap:
> [bot build 4/4] RUN cargo install --path .:
1.556 thread 'main' panicked at library/std/src/sys/pal/unix/time.rs:123:72:
1.556 called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }
It seems to be unable to get the current system time, the only journal entry from the docker daemon I could find that is emitted at that time is:
Oct 18 18:45:17 raspberrypi dockerd[1481]: 2024/10/18 18:45:17 http2: server: error reading preface from client @: read unix /run/docker.sock->@: read: connection reset by peer
Perhaps related? I'm no docker expert, but I figured I'd include this.
Related Stuff
This is the only similar case I found, but the privileged mode did not fix it. Somewhat related is this podmand thread with a similar root cause to the other I assume considering it's about the seccomp profile. I did not try this as privileged implies an unconfined seccomp profile, I believe.
This may just be a host problem (see below), but I'm reporting it here because my age-old postgres and dotnet containers are running fine.
Platform and Version
I'm using the rust:1.80 docker image.
The host where this happens:
- platform: Raspberry Pi 4 Model B Rev 1.4
- kernel:
Linux raspberrypi 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux - docker:
26.1.4, build 5650f9b.
Host where it works (for reference):
- kernel:
Linux hsh 6.10.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 12 Sep 2024 17:21:02 +0000 x86_64 GNU/Linux - docker:
27.2.1, build 9e34c9bb39
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing cargo install --path . in the rust:1.80 image on the reported Raspberry Pi host, then compare it with the working host's kernel and Docker versions. Check whether the failure is tied to retrieving system time during the container build and whether Docker's security configuration affects it; done means identifying a reproducible cause and a confirmed fix or documenting that it is host-specific.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, rust
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100