Skip to content

Instantly share code, notes, and snippets.

@zippy1981
Created December 6, 2024 12:57
Show Gist options
  • Save zippy1981/c282588160b9ce6e8d89dbd61a8d67d9 to your computer and use it in GitHub Desktop.
Save zippy1981/c282588160b9ce6e8d89dbd61a8d67d9 to your computer and use it in GitHub Desktop.
GOLANG dev container to cross compile to Windows
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// 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": "mcr.microsoft.com/devcontainers/go:1-1.23-bookworm",
"features": {
"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {},
"ghcr.io/schlich/devcontainer-features/powerlevel10k:1": {},
"ghcr.io/nils-geistmann/devcontainers-features/zsh:0": {},
"ghcr.io/devcontainers-extra/features/actionlint:1": {},
"ghcr.io/devcontainers-extra/features/zsh-plugins:0": {},
"ghcr.io/martinaskestad/features/mingw:1": {}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "go version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment