Skip to content

spritely/containers.dotnet8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

containers.dotnet8

This repo is now only passively maintained with automation. Upgrade to containers.dotnet10.

Creates a devcontainer with dotnet8 preinstalled.

Published container is available from: https://hub.docker.com/repository/docker/spritelydev/dotnet8-devcontainer

Developer Information

To Manually Copy a Template

  1. Copy the src directory into your repository under the .devcontainer folder.
  2. Rename container-compose.template to container-compose.yaml and edit the file to replace {repo-name} with the name of the repo.
  3. Edit the devcontainer.json file and replace {repo-name} with the name of the repo.

Testing

Run the prepare-for-test.sh script as follows. Create or modify the test/{container-name}/.devcontainer/.env file as needed. Then open the new folder in Visual Studio Code and reopen the folder inside the devcontainer to validate it.

First time only

chmod +x prepare-for-test.sh

To Test

# prepare-for-test.sh {container-name} {true|false - default is false if not supplied}
# code test/{container-name}

# if second argument is true then prepare-for-test also runs this line:
# cp test/{container-name}/.devcontainer/.env.example test/{container-name}/.devcontainer/.env

# Example:
./prepare-for-test.sh dotnet8 true
code test/dotnet8

When Visual Studio Code starts select the "Reopen in Container" option. Check that it works. It is often necessary to examine the devcontainer installation logs if something doesn't work as expected.

Troubleshooting Notes

Some containers will fail to start because they are designed to run as root user.

This is especially problematic when using a rootless environment such as with podman.

For example: microsoft/vscode-remote-release#1685

For additional details on this problem, see: https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user

Fortunately, there is a simple solution: use a compose file. So that pattern is applied here.

About

Creates a dotnet8 devcontainer

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors