Sign inSign up

google85/devcontainer-go

By google85

Updated 25 days ago

VsCode devcontainer for Golang

Image
Developer tools
2

325

google85/devcontainer-go repository overview

Go devcontainer

  • Go versions: v1.27.0 | v1.24.3 | v1.20.3 | v18.4

  • Registry: DockerHub

  • Source code: GitHub (private)

Compose file:
  • direct:
name: go-devcontainer
services:
  devcontainer:
    image: google85/devcontainer-go:1.27
    hostname: devcontainer
    working_dir: /usr/src/app
    environment:
      - TZ=Europe/Bucharest
      - GOPATH=/go
    volumes:
      - ..:/usr/src/app
    extra_hosts:
      - "host.docker.internal:host-gateway"
    tty: true

  • using custom Dockerfile based on this image:
name: go-devcontainer
services:
  devcontainer:
    image: devcontainer-go:1.27
    build:
      context: .
      dockerfile: Dockerfile
      args:
        USERNAME: vscode
        GO_VERSION: 1.27.0
        USER_UID: 1000
        USER_GID: 1000
    hostname: devcontainer
    working_dir: /usr/src/app
    environment:
      - TZ=Europe/Bucharest
      - GOPATH=/go
    volumes:
      - ..:/usr/src/app
    extra_hosts:
      - "host.docker.internal:host-gateway"
    tty: true
  • Dockerfile:
FROM google85/devcontainer-go:1.27

ENTRYPOINT [ "/bin/bash" ]

Usage:
  • VsCode: Open/Reopen in container

Tag summary

Content type

Image

Digest

sha256:c78e51a3b

Size

440.2 MB

Last updated

25 days ago

docker pull google85/devcontainer-go:1.27