Questions tagged [devcontainer]
65 questions
1
vote
0 answers
vscode .devcontainer and docker-compose version mismatch
I am trying to run a dev container on my vsode for ruby on rails, however, I cannot and getting the following error:
[2022-07-14T15:35:08.995Z] ERROR: Version mismatch: file /home/parham/projects/ruby/.devcontainer/docker-compose.yml specifies…

parham
- 196
- 6
0
votes
0 answers
Specify platform for Docker image in Visual Studio Code DevContainers
I'm using a MacBook Pro with the M2 processor (arm64) but I need to start a devcontainer with an amd64 version of the Python image (buster):
Docker image: mcr.microsoft.com/devcontainers/python:0-3.11-buster
This is what I've tried so far:
Add…

Joaquín L. Robles
- 6,261
- 10
- 66
- 96
0
votes
0 answers
VS Code fails to open devcontainer locally but works on Codespaces
As shown below I get a weird error message when I "Reopen in Devcontainer", yet the devcontainer works on codespaces. I have no idea why. Details below:
Reproducible example that does not open in local devcontainer:…

RobinLovelace
- 4,799
- 6
- 29
- 40
0
votes
0 answers
How to keep a daemon running in `.devcontainer` setup?
I have a devcontainer.json which contains the following in
{
"name": "Dev Container",
"dockerComposeFile": [
"docker-compose.yaml"
],
"workspaceFolder": "/workspace",
"service": "dev",
"postStartCommand": [
…

Gabriel
- 8,990
- 6
- 57
- 101
0
votes
0 answers
GitHub codespace forwarded port local address not correct
I have a docker compose setup that I have configured to be able to deploy to Codespaces. However when when setup completes, the URL for the forwarded port creates a download response instead of taking me to the web server. However, when access the…

Jon Erickson
- 1,876
- 4
- 30
- 73
0
votes
1 answer
Rebuild redis docker with Dev Containers failling cause port is already allocated
I'm trying to work with VSCode Dev Containers, but I facing an issue.
I have a docker-compose.yml, with 2 services:
version: '3'
services:
redis:
image: redis:alpine
ports:
- "6379:6379"
worker:
depends_on:
- redis
…

Vitor Albres
- 113
- 3
- 9
0
votes
0 answers
When devcontainer setup is finished, I want it to be in a state waiting for input
My Problem
When devcontainer setup is finished, the terminal is usually in this state, with logs flowing.
Instead, can you make it so that it is waiting for input from the user when the setup is finished, as in the following image?
For example,…

Kitamado
- 224
- 2
- 9
0
votes
0 answers
How to add dotnet user-secrets in a devcontainer.json file for GitHub Codespaces?
I want to create a devcontainer.json file that does the following:
Installs .NET SDK, Nodejs, Git and Git LFS.
Installs some custom extensions to VS code.
Runs some commands on the terminal when the container is created to add user secrets to a…

Jossean Yamil
- 850
- 2
- 9
- 22
0
votes
0 answers
BROWSER variable not set and available in postStart or postAttach
I am working on a feature in a specific dev container implementation. I am trying to run "az login" interactively when the container is setup. I invoked the command during a script that is run in "postStartCommand", i also tried "postAttachCommand",…

BraKi Brakstad
- 11
- 4
0
votes
0 answers
Automating Configuration of devcontainer.json in GitHub Codespaces with Frequently Used VSCode Extensions
I am utilizing GitHub Codespaces with VSCode Remote to streamline my development workflow. However, every time I create a new Codespace, I find myself manually configuring the devcontainer.json file to include the VSCode extensions that I frequently…

Safwan Amin
- 75
- 3
0
votes
0 answers
Error when trying to build a dev container from VSCode
I'm trying to build a new dev container from the DevContainer extension it self through the path:
Dev Containers: New Dev Container
Configuration model: Ubuntu
Additional Options:
jammy (default)
Python
Default
Every single time I get an error…

tcrepalde
- 335
- 1
- 3
- 10
0
votes
1 answer
Move `.devcontainers/` to outside the repo
I'm frequently working in repositories I do not own (typically open source things). I often want to run dev containers in VS Code as part of my workflow. However, VS Code creates a .devcontainers/ directory for the configuration. For my own repos,…

lindhe
- 806
- 2
- 14
- 32
0
votes
1 answer
How do I prebuild a devcontainer including postCreateCommand settings in devcontainer.json
I found a couple other questions around here like this, with no answers.
I am using this project to prebuild a devcontainer and push it to Github Container Registry: https://github.com/devcontainers/ci/blob/main/docs/github-action.md
The relevant…

Appleoddity
- 647
- 1
- 6
- 21
0
votes
0 answers
Devcontainer build error when using podman with vscode
Here is the complete log of the problem.
After processing all the features, it seems to jump into error while copying files (no such file or directory found) and ultimately fails.
But when I actually checked the path, it did have…

MRDGH2821
- 33
- 10
0
votes
1 answer
Using openapi-generator-cli inside a devcontainer
I am trying to run openapi-generator-cli from a devcontainer. Here are the files I used :
// .devcontainer/devcontainer.json
{
"name": "OpenAPI DevContainer",
"dockerFile": "Dockerfile",
"mounts": [
…

groromain92
- 65
- 6