Reputation: 1
this is the error: https://i.sstatic.net/rEMivHsk.png
I've been trying to set up a container in my project. I am new in creating containers and I don't know much about them. I've searched for a lot of questions and other docker hub information but I could not solve the problem.
This is my Dockerfile:
FROM python:3.11-buster
LABEL description="Remote Containers for tutorials"
LABEL version="1.0"
COPY requirements.txt ./
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
ENV PYTHONPATH "/"
WORKDIR .
And this is the error log:
[2025-01-29T13:33:12.275Z] Command failed: C:\Users\orkan\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\orkan\.vscode\extensions\ms-vscode-remote.remote-containers-0.394.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\orkan\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-39a19f6b-588b-4226-bd27-eccb38782c291738157583495 --workspace-folder c:\Users\orkan\Documents\hypnoteizer\Astrophysics\Setup - VSCode --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=c:\Users\orkan\Documents\hypnoteizer\Astrophysics\Setup - VSCode --id-label devcontainer.config_file=c:\Users\orkan\Documents\hypnoteizer\Astrophysics\Setup - VSCode\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\orkan\Documents\hypnoteizer\Astrophysics\Setup - VSCode\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
I tried to copy directly from the repo of the tutorial, but it didn't fix the problem. The tutorial uses python3.9 but I currently have 3.11 . I dont think this is a problem but I wanted to mention. He uses python:3.9-buster so I used 3.11-buster .
Upvotes: -1
Views: 45
Reputation: 1
If looking correctly, I know this line you have: ENV PYTHONPATH "/"
usually the syntax for it is: ENV <key>=<value>
or for an example: ENV PythonPath="/"
if not that WORKDIR is definitely suspicious with using VS code. Is this on Windows? See if you can't remove the image and try rebuilding this. If that doesn't work, try commenting out the pip install line, remove the image, and make a fresh one and try the build again and show us the error.
could just be something with syntax or a bad image build.
Upvotes: 0