opencontainers / opencontainers/runc
More user friendly error message on mkdir failure
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
It would be nice with a more user friendly error message when mkdir fails.
FROM debian:stable-slim
RUN mkdir -p /hostvolume/buildvolume/content
VOLUME /hostvolume/buildvolume
docker run --rm -it -v $PWD:/hostvolume:ro a6ff2c221aaa bash
docker: Error response from daemon: OCI runtime create failed: container_linux.go:336: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:57: mounting \\\"/var/lib/docker/volumes/68ea6bf2489a77aa8f5f0564219c5c62c952cce0279d47ba144032f831e4527a/_data\\\" to rootfs \\\"/var/lib/docker/overlay2/45d9d35420719503083473a549170b60e7bc2658502b0222e1f84d2c8813441c/merged\\\" at \\\"/var/lib/docker/overlay2/45d9d35420719503083473a549170b60e7bc2658502b0222e1f84d2c8813441c/merged/hostvolume/buildvolume\\\" caused \\\"mkdir /var/lib/docker/overlay2/45d9d35420719503083473a549170b60e7bc2658502b0222e1f84d2c8813441c/merged/hostvolume/buildvolume: read-only file system\\\"\"": unknown.
WIth the current error message, it can take a while to figure out why it is trying to create a directory. Also, it isn't obvious that the directory it is trying to create a directory in, is the source directory of my hostvolume bind volume.
Contributor guide
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
Reproduce the failure with the Dockerfile and docker run commands in the issue, then trace the reported mkdir failure through the container startup path. Done means the error explains why the directory is being created and identifies that the parent comes from the hostvolume bind mount.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100