Update devcontainer to support docker auto-discovery (#501)
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/go
|
||||
{
|
||||
"name": "Go",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "golang:1.24-bookworm",
|
||||
// Use bookworm due to
|
||||
// (!) The 'moby' option is not supported on Debian 'trixie' because 'moby-cli' and related system packages have been removed from that distribution.
|
||||
// (!) To continue, either set the feature option '"moby": false' or use a different base image (for example: 'debian:bookworm' or 'ubuntu-24.04').
|
||||
"image": "golang:1.25-bookworm",
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
"features": {
|
||||
// For in-docker discovery testing
|
||||
|
||||
@@ -7,12 +7,16 @@ services:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
# Matches MCs below
|
||||
network_mode: bridge
|
||||
vanilla:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
labels:
|
||||
mc-router.host: "vanilla.example.com"
|
||||
mc-router.host: "localhost.itzg.me"
|
||||
# To allow for routing from devcontainer
|
||||
network_mode: bridge
|
||||
paper:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
@@ -20,4 +24,6 @@ services:
|
||||
TYPE: PAPER
|
||||
labels:
|
||||
mc-router.host: "paper.example.com"
|
||||
# To allow for routing from devcontainer
|
||||
network_mode: bridge
|
||||
|
||||
|
||||
Reference in New Issue
Block a user