1
0

More than 1 year has passed since last update.

VSCodeのRemoteContainerのGo拡張機能に必要なライブラリをインストールする

Posted at

はじめに

この記事は2022年月7にまとめていた「細かいつまずいたことをメモしておく(7月編)をそれぞれ投稿した内容になります
解決方法が最新でない可能性もありますのでご了承ください

問題

VSCodeのRemoteContainerでGoコンテナの中に入って拡張機能をインストールすると、goplsなど依存するライブラリを入れる必要があり、推奨されたインストールを何回か実行してインストール待ちが発生してしまうので、コンテナに必要なものを入れておいて、RemoteContainerではGo拡張だけをインストールするようにしたかったです

解決方法

以下をDockerfileに加えた

Dockerfile
RUN go install golang.org/x/tools/gopls@latest
RUN go install github.com/ramya-rao-a/go-outline@latest
RUN go mod tidy
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