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
|
// README at: https://github.com/devcontainers/templates/tree/main/src/go
|
||||||
{
|
{
|
||||||
"name": "Go",
|
"name": "Go",
|
||||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
// Use bookworm due to
|
||||||
"image": "golang:1.24-bookworm",
|
// (!) 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 to add to the dev container. More info: https://containers.dev/features.
|
||||||
"features": {
|
"features": {
|
||||||
// For in-docker discovery testing
|
// For in-docker discovery testing
|
||||||
|
|||||||
@@ -7,12 +7,16 @@ services:
|
|||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
# Matches MCs below
|
||||||
|
network_mode: bridge
|
||||||
vanilla:
|
vanilla:
|
||||||
image: itzg/minecraft-server
|
image: itzg/minecraft-server
|
||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
labels:
|
labels:
|
||||||
mc-router.host: "vanilla.example.com"
|
mc-router.host: "localhost.itzg.me"
|
||||||
|
# To allow for routing from devcontainer
|
||||||
|
network_mode: bridge
|
||||||
paper:
|
paper:
|
||||||
image: itzg/minecraft-server
|
image: itzg/minecraft-server
|
||||||
environment:
|
environment:
|
||||||
@@ -20,4 +24,6 @@ services:
|
|||||||
TYPE: PAPER
|
TYPE: PAPER
|
||||||
labels:
|
labels:
|
||||||
mc-router.host: "paper.example.com"
|
mc-router.host: "paper.example.com"
|
||||||
|
# To allow for routing from devcontainer
|
||||||
|
network_mode: bridge
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user