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
Using dockerComposeFile via podman-compose, resolves Dockerfile in wrong directory (ENOENT on Dockerfile) #7071
Comments
I believe this may be the same problem I was having: #6815 (comment) On that issue, it was fixed for Docker, but it was not fixed for Podman. Can you try downgrading to "Remote - Containers" v0.234.0? - I believe this is last version that worked before Podman compose files started being called relative to the |
|
Since OP didn't confirm, I will. The issue is still happening in v0.266.1 and yes, rolling back to v0.234.0 seems to resolve it. I'll watch this issue for updates. |
Can confirm this happens with both the current release (v0.275.1) and pre-release (v0.278.0) versions, downgrading to v0.234.0 at least gets the build going unlike with the more recent versions. |
Still an issue on v0.288.1, based on the error message, seems like the current working directory just needs to be set to the .devcontainer path, or an unqualified Dockerfile needs to have the expanded path prepended before calling out? |
still an issue on v0.302.0 (pre-release) |
Can this please be fixed? This holds me up from using podman-compose. Thanks. |
I ran into this issue under Fedora 39 using podman. Here is a workaround using a wrapper script for #!/bin/sh
set -e
# Workaround https://github.com/microsoft/vscode-remote-release/issues/7071
# "Using dockerComposeFile via podman-compose, resolves Dockerfile in wrong directory (ENOENT on Dockerfile)"
# Save this script to somewhere like /usr/local/bin/podman-compose-vscode-workaround
# then in vscode settings, set "dev.containers.dockerComposePath" = "podman-compose-vscode-workaround"
# instead of "podman-compose".
#
# Using information from the parent process, set a VSCODE_WORKSPACE_FOLDER
# environment variable that can be optionally used in docker-compose.yaml
# to set an absolute path for the context:
#
# version: '3'
# services:
# myapp:
# build:
# context: ${VSCODE_WORKSPACE_FOLDER:-..}
# dockerfile: .devcontainer/Dockerfile
VSCODE_WORKSPACE_FOLDER="$(grep -aoP "\x00--workspace-folder\x00\K[^\x00]+" /proc/$PPID/cmdline || true)"
export VSCODE_WORKSPACE_FOLDER
exec podman-compose $@ |
Steps to Reproduce:
Alternatively (sorry, only useful on a steam deck):
The text was updated successfully, but these errors were encountered: