LoginSignup
1
0

More than 5 years have passed since last update.

windowsでdocker-toolbox + goのhello world

Last updated at Posted at 2017-05-14

参考

ほぼここのまま
http://qiita.com/macoshita/items/827ae5ac245b94ed4b4c

docker-toolboxをインストール

docker-compose.ymlを作成

docker-compose.yml
version: '2'

services:
  app:
    image: 'golang:1.6-onbuild'
    volumes:
      - 'data:/go'
      - '.:/go/src/app'
    ports:
      - '8080:8080'
    command: 'go run main.go'

volumes:
  data:
    driver: 'local'
main.go
// main.go
package main

import (
    f "fmt"
)

func main() {
    f.Println("hello world")
}

docker-quickstart-terminalを起動

0c0999b342b127fedf1b5b4df871572e.png

実行

docker-compose run app go-wrapper download
docker-compose up

6b61b09240dcfcd6c5c19850e61adb10.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0