Closed JustinGrote closed 2 months ago
Thanks for reaching out, @JustinGrote!
@flouthoc PTAL
I have the same issue, also probably the same as microsoft/vscode-remote-release#7408.
A friendly reminder that this issue had no activity for 30 days.
See also here: https://github.com/microsoft/vscode-remote-release/issues/8103
I'm running into this as well using the latest version of podman on Windows (currently 4.4.1). It looks to me that the absolute path not being forwarded correctly to podman. For example, in the OP the following is being passed to podman:
-f C:\Users\jgrote\AppData\Local\Temp\devcontainercli\container-features\0.25.2-1675271780761\Dockerfile.extended
But the path that's being reported as not found in podman is:
/var/tmp/libpod_builder4232675966/build/C:/Users/jgrote/AppData/Local/Temp/devcontainercli/container-features/0.25.2-1675271780761/Dockerfile.extended
I would have thought it should be mapped to:
/mnt/c/Users/jgrote/AppData/Local/Temp/devcontainercli/container-features/0.25.2-1675271780761/Dockerfile.extended
Same thing happening in 4.4.4
Same thing happening in 4.4.2
and 4.4.4
on Mac M1.
Managed to make it work by uninstalling, manually installing 4.3.1 .
This is happening on 4.5.0 too, on macOS M1. Even with a fresh VM.
I'm experiencing the same behavior on 4.5.0 on M1 Mac
The same on Windows and Podman 4.5.0
Having the same problem here
Hey everyone please thumbs up the top issue comment if you are having it, do not "me too" comment, all you do is ping notifications to everyone.
As of now there is no workaround as podman does not handle the paths provided by features on Windows/Mac, so if you need to use devcontainers with features, docker seems to be the only option ATM or use Linux as your host
EDIT: Apparently as of 4.6.0-rc1 there is a potential fix: https://github.com/containers/podman/issues/17313#issuecomment-1625245623
Just to add that this is specific to MacOS and Windows podman. The same files on linux works without any problem.
I had the same issue using Podman v4.5.1.
I updated to Podman v4.6.0-rc1 and set dev.containers.mountWaylandSocket: false
.
Now it´s working!
Along with this, I have some additional errors
[2023-07-22T04:36:19.899Z] Start: Run: podman buildx build --load --build-context dev_containers_feature_content_source=C:\Users\mihir\AppData\Local\Temp\devcontainercli\container-features\0.46.0-1690000563663 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/typescript-node:18 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-discord-ban-utils-bot-1aa5cea51a6a29accd4e5bf90982d33d7326a6face5746c5a4de512e457efaa4-features -f C:\Users\mihir\AppData\Local\Temp\devcontainercli\container-features\0.46.0-1690000563663\Dockerfile.extended c:\Users\mihir\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data\empty-folder
[2023-07-22T04:36:19.981Z]
[2023-07-22T04:36:20.163Z] time="2023-07-22T10:06:20+05:30" level=error msg="While reading directory C:\\Us
ers\\mihir\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-vscode-remote.remote
-containers\\data\\empty-folder: EOF"
[2023-07-22T04:36:20.257Z] [1/2] STEP 1/4: FROM mcr.microsoft.com/devcontainers/typescript-node:18 AS dev_c
ontainers_feature_content_normalize
[2023-07-22T04:36:20.288Z] [1/2] STEP 2/4: USER root
--> Using cache f02a69516a9b42331906b7d959d7ee3ef9d900eb2d63711a6b2e39db0bd56698
--> f02a69516a9b
[1/2] STEP 3/4: COPY --from=dev_containers_feature_content_source devcontainer-f
eatures.builtin.env /tmp/build-features/
[2023-07-22T04:36:20.320Z] Error: building at STEP "COPY --from=dev_containers_feature_content_source devco
ntainer-features.builtin.env /tmp/build-features/": checking on sources under "/
home/user/C:\\Users\\mihir\\AppData\\Local\\Temp\\devcontainercli\\container-fea
tures\\0.46.0-1690000563663": error in copier subprocess: changing to intended-n
ew-root directory "/home/user/C:\\Users\\mihir\\AppData\\Local\\Temp\\devcontain
ercli\\container-features\\0.46.0-1690000563663": chdir /home/user/C:\Users\mihi
r\AppData\Local\Temp\devcontainercli\container-features\0.46.0-1690000563663: no
such file or directory
Complete log remoteContainers-2023-07-22T04-35-58.871Z.log
I posted here too - https://stackoverflow.com/questions/76739312/devcontainer-build-error-when-using-podman-with-vscode
Confirming that it works for me on macOS M2 as well with podman 4.6.0 - no need to fiddle with wayland settings (that is Windows specific I think)
still have same problem in windows 11, with podman v4.6.1
still have the same issue in Mac Apple M1, with podman v4.6.2
still have the same issue in Mac Apple M1, with podman v4.7.0
I have this issue with Windows 11 and podman 4.7.2
I have this issue with Windows 11 and podman 4.8.2
I have this issue with Windows 11 and podman 4.8.0
Just a bump that this is the big reason I don't use podman and continue to use docker on Windows...
@n1hility Thoughts?
I have the same issue, it's a show stopper for using podman for me.
still have the same issue in Mac Apple Intel , with podman 4.8.3
Still having an issue on Windows with podman 4.9.3
But I want to add a finding, that might be helpful: My username contains a white space (which is common in Windows) and this might cause the problem. The failing command looks like this:
Error: Command failed: podman buildx build --load --build-context dev_containers_feature_content_source=C:\Users\MYNAME~1\AppData\Local\Temp\devcontainercli\container-features\xxx --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/base:bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-xxx-features -f C:\Users\MYNAME~1\AppData\Local\Temp\devcontainercli\container-features\xxx\Dockerfile.extended c:\Users\Myname Surname\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data\empty-folder
The call gets interpreted as a command with two args, one being c:\Users\Myname
, the other being Surname\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data\empty-folder
. Manually calling this leads to Error: accepts at most 1 arg(s), received 2
.
Simply adding quotes to the arg in that call would solve the issue. Does anyone of the contributors know where to fix that?
I had the same issue using Podman v4.5.1. I updated to Podman v4.6.0-rc1 and set
dev.containers.mountWaylandSocket: false
. Now it´s working!
Podman 5.0.2. Does not work on Windows. I had to add dotnet installation on to the Dockerfile.
+1 facing with podman v5.0.2 on mac
This is the most voted on issue in this repo. Could it please get some attention?
@l0rd Thoughts?
Looking at it. The VS Code dev containers extension documentation talks about some limitations when using podman, but that may be outdated as it refers to podman v1.9. @JustinGrote or @virzak can you please share the configuration settings you are using (podman and vscode side)?
update: I have identified the cause of the problem. The issue is with the option --build-context <label>=<path>
of podman build
. The context <path>
is not re-mapped as a path in the guest OS. It is mentioned in the documentation. I am looking at the source code to see how hard it is to fix.
The additional build contexts specified with --build-context
are not included in the build context tarball (and are not copied to the remote machine). To address that we should add the additionalBuildContexts to the tarContent too, and update the additional contexts paths.
@mheon is that something that we plan to work on in the context of the buildx APIs? Otherwise I can give it a try during this sprint.
Also, this issue is related (the same?) to https://github.com/containers/podman/issues/18691 and https://github.com/containers/podman/issues/18840
I don't think this is tracked by the buildx work - another card would be best
EDIT: POTENTIAL FIX IN 4.6.0: https://github.com/containers/podman/issues/17313#issuecomment-1625245623
Issue Description
Dev containers features fails on the podman buildx command, it looks like the temp file doesn't get copied correctly by the builder.
Steps to reproduce the issue
Steps to reproduce the issue
Simple Example:
Describe the results you received
Describe the results you expected
Describe the results you expected
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting