Skip to content

example project used to test devcontainer initialization with devpod

Notifications You must be signed in to change notification settings

dankaiser1808/example-devcontainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Devpod Example

A simple example of how to use my dotfiles repository with a Devpod devcontainer. It works completely independent of your operating system — all you need is Devpod and a provider of your choice. In this example, we’ll use Docker as the provider.

We also use mise as our all-in-one, cross-OS package manager. It provides a great developer experience, allowing us to easily switch between versions of programming languages without restarting the container.

How does it work?

After installing Devpod, make sure to add the Docker provider:

devpod provider add docker

From the project root, run the following command to start your workspace:

devpod up --dotfiles https://github.com/dankaiser1808/dotfiles.git .

It will perform the following actions:

  1. Create a container based on the devcontainer.json file located in .devcontainer/.
  2. Run scripts/setup to trust the mise.toml tool specification which is required before mise will install the defined tools.

Devpod Dotfiles Support

Devpod has built-in dotfiles support. When you pass --dotfiles https://github.com/dankaiser1808/dotfiles.git, Devpod will clone the repository and look for a setup script in the following locations:

  • install.sh
  • install
  • bootstrap.sh
  • bootstrap
  • script/bootstrap
  • setup.sh
  • setup
  • script/setup

Once a matching script is found, it will be executed.

From there, chezmoi takes over to apply and initialize the dotfiles.

You can check my dotfiles repository to see the full workflow.

About

example project used to test devcontainer initialization with devpod

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published