How to Setup GitHub Codespace(a Docker instance) to Use another Docker within it #137140
-
Select Topic AreaQuestion BodyI'm currently using GitHub Codespace as my cloud IDE for programming but I'm having issue on how to run docker commands within it. For instance, I use my Dockerfile, devcontainer.json and a install.sh script to spin up my GitHub Codespace (a Docker instance) for programming. Now my work involved running Docker commands like creating an image within my Codespace which is a docker instance. Please how can I do such action in codespace? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found out that there's a feature for docker-in-docker to include to my Sample below {
"name": "Docker in Docker",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
}
} With this I can run docker commands in my codespace |
Beta Was this translation helpful? Give feedback.
I found out that there's a feature for docker-in-docker to include to my
devcontainer.json
file to make it worksSample below
With this I can run docker commands in my codespace