devcontainer features test command inside a container with mounted docker socket -> problems with /tmp
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, typescript
Research direction
Start with the devcontainer features test command, especially scenario handling, and trace how temporary files under /tmp are mounted into the test container. Compare the proposed configurable temporaryPath with the alternative of copying files during the build; done means tests work when the CLI runs inside a container with a mounted Docker socket.
Written by the indexing model from the issue text.
Description
The devcontainer features test (especially for scenarios) creates everything needed in a directory in /tmp. When the container is created, this folder is mounted inside the container (probably for the additional files and the verifying .sh file).
This leads to problems when the devcontainer-cli and the test are running inside a container with a mounted docker socket.
The problem is that the /tmp with the correct data is in the container and when creating the test-container and mounting the /tmp, the /tmp from the docker host (outside of the container) is used which does not know the the correct data of course.
I tried to draw this:
/ Docker-Host
├── Docker / Docker Socket
├── container with devcontainer cli
│ ├── workspace
│ │ ├── src
│ │ └── test
│ └── tmp (contains the temporary devcontainer spec)
└── tmp (is mounted when the devcontainer is started)
In some cases this is easy fixable by mounting /tmp from the host to /tmp into the container with the devcontainer cli but sometimes (in some CI scenarios), adding additional mounts is not possible.
My suggestion would be to be able to specify the temporaryPath where all these files are placed. If this path could be specified, it would at least be possible to use some clever symlinking to achieve the same path inside the container with the cli and from the host.
An alternative would be to not need this mount at all and copy all those files during the build of the container into the container so they are directly available.
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 461
- Avg merge
- 18m
- Merged PRs (30d)
- 5
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.
More from devcontainers/cli
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
devcontainers/cli#1203 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
devcontainers/cli#1178 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
devcontainers/cli#1308 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
devcontainers/cli#1307 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
devcontainers/cli#1305 ·
All issues in devcontainers/cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ontola/atomic-server#1625 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·