LoginSignup
1
2

More than 5 years have passed since last update.

Dockerしかない環境でgo install を行う

Posted at

自分用メモ

docker run --rm -v `pwd`:/go golang bash -c "GOPATH=/go GOBIN=/go/bin go install <ビルドしたいファイル名>"

単純にworking directryにソースをマウントし、GOPATH, GOBINを環境変数として割り当ててgo installしてるだけ。
生成されたファイルは pwd/binに格納されている。

1
2
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
2