-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
devcontainer fail to start when using podman instead of docker #15001
Comments
Can you provide the podman commands that are used to build and run the image? What are the error messages you are seeing? Do you use it on linux, macos, windows? |
I'm on ArchLinux. Last error is mkdir: cannot create directory '/root': Permission denied
Exit code 1
Command in container failed: mkdir -p '/root/.vscode-server/bin' && ln -s '/vscode/vscode-server/bin/x64/{{hashA}}' '/root/.vscode-server/bin/{{hashA}}' |
All of three under similar calling. {{XXX}} build \
-f /path/to/.devcontainer/Dockerfile \
-t vsc-tmp.{{hash}} \
--build-arg VARIANT=focal \
/path/to/.devcontainer
...
{{XXX}} build \
-f /tmp/vsch/updateUID.Dockerfile-0.191.1 \
-t vsc-tmp.{{hash}}-uid \
--build-arg BASE_IMAGE=vsc-tmp.{{hash}} \
--build-arg REMOTE_USER=vscode \
--build-arg NEW_UID=1000 \
--build-arg NEW_GID=1000 \
--build-arg IMAGE_USER=root \
/tmp/vsch docker (rootful docker + usermod) Start: Run in container: test -d /home/vscode/.vscode-server
Start: Run in container: test -d /home/vscode/.vscode-remote
... podman Start: Run in container: test -d /root/.vscode-server
Start: Run in container: test -d /root/.vscode-remote
... sudo-podman Start: Run in container: test -d /root/.vscode-server
Start: Run in container: test -d /root/.vscode-remote
... |
First are you running both in rootful mode? |
Log updated. OK in Fail in both |
Plus, does below affect build or just shell? It's the only kind of warning appear in STEP 6/9: SHELL ["/bin/sh", "-c"]
WARN[0007] SHELL is not supported for OCI image format,
[/bin/sh -c] will be ignored. Must use `docker` format |
Use --format docker, to not use OCI Format. |
On devcontainer you also need to specify the
Because I uses bind mount for the code, I need to add |
Ah, get it working. settings.json
devcontainer.json
podman-devcontainer-wrapper
ref |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
devcontainer fail to start when using podman instead of docker
Steps to reproduce the issue:
podman run hello world with normal user and root user, ensure podman is working.
vscode generate ubuntu devcontainer config
All choose default
1.1.
Ctrl+Shift+P
1.2. remote-containers: add dev configuration files
1.3. choose ubuntu
1.4. choose default
Generated config
.devcontainer/devcontainer.json
.devcontainer/Dockerfile
"remote.containers.dockerPath": "podman"
Also tested failed with
"remote.containers.dockerPath": "sudo-podman"
reopen in container
button.Describe the results you received:
Image are built using podman, but devcontainer fail to start when using podman instead of docker
Describe the results you expected:
Devcontainer using podman start up working like when using docker.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Workaround
Remove
"remoteUser": "vscode"
.Verified
mcr.microsoft.com/vscode/devcontainers/base:0-focal
has uservscode
.Guess
I guess podman is not switch user correctly?
Edit
Reproduce repo
https://github.com/loynoir/reproduce-podman-15001
The text was updated successfully, but these errors were encountered: