How to duplicate a GitHub Codespace for use as a development template?
Asked Answered
H

1

6

I have a Codespace with a bunch of development tools installed.

I'd like to use this Codespace as a template so that I can start new projects from there.

I can create a Dockerfile that installs the tooling, and then build a new Codespace from that.

But is there a way I can just create a new Codespace from an existing one?

Helgahelge answered 1/1, 2022 at 17:25 Comment(1)
Agreed. Please helpEkaterinburg
C
0

If I understand this correctly you can start by using one of images listed in the link below as codespace is basically a devcontainer running at the root of your project and if you load a devcontainer inside codespace it will actually use your devcontainer image as the host.

so basically create a new devconatiner based on this https://hub.docker.com/r/microsoft/vscode-devcontainers

now I think you can use what they call prebuild image as a your base

see this for details https://containers.dev/guide/prebuild

But if it easier just push your own built image to docker hub or github and reference it in your root small dockerfile

Hope that help.

Calica answered 17/10 at 23:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.