Skip to content

Instantly share code, notes, and snippets.

@dbones
Created March 22, 2024 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbones/72f52ecd0e3dfe8d5953037fe36c61f6 to your computer and use it in GitHub Desktop.
Save dbones/72f52ecd0e3dfe8d5953037fe36c61f6 to your computer and use it in GitHub Desktop.
dev container
version: '3'
services:
workspace:
image: dbones/dotnet8:0.0.1
# image: dbones/node21:0.0.1
container_name: workspace
working_dir: /code
volumes:
- demo:/code
- ./local:/local
- ~/.ssh/id_github:/root/.ssh/id_rsa
- ./NuGet.Config:/root/.nuget/NuGet/NuGet.Config
networks:
- dev
ports:
- "5000:5000" # dotnet
- "5001:5001" # dotnet
- "5173:5173" # vitepress
# [Optional] Required for ptrace-based debuggers like C++, Go, and Rust
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
# Overrides default command so things don't shut down after the process ends.
# command: sleep infinity
command: /bin/sh -c "while sleep 1000; do :; done"
networks:
dev:
name: dev_dev
external: true
volumes:
demo:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="gh-dbones-labs" value="https://nuget.pkg.github.com/dbones-labs/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageSourceCredentials>
<gh-dbones-labs>
<add key="Username" value="usr" />
<add key="ClearTextPassword" value="pwd" />
</gh-dbones-labs>
</packageSourceCredentials>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment