Description
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
ARG VARIANT="focal"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
- But, user settings
"remote.containers.dockerPath": "podman"
Also tested failed with "remote.containers.dockerPath": "sudo-podman"
- click right down
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
:
podman version 4.1.1
Output of podman info --debug
:
Package info (e.g. output of rpm -q podman
or apt list podman
):
podman 4.1.1-2
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 user vscode
.
Guess
$ podman history --no-trunc --format "{{.CreatedBy}}" localhost/vsc-xxx-uid
/bin/sh -c #(nop) USER $IMAGE_USER
...
/bin/sh -c #(nop) USER root
RUN ... bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" ...
...
I guess podman is not switch user correctly?
Edit
Reproduce repo