2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Ubuntuインストール後にやること(Dockerを使用した開発環境構築)

Last updated at Posted at 2020-06-30

アップデート

sudo apt update
sudo apt-get update
sudo apt upgrade -y
sudo apt autoremove

インストール済みアプリの確認

apt list | grep git
apt list | grep docker

dockerインストール

sudo apt install docker.io -y
sudo usermod -aG docker $USER
sudo systemctl start docker
sudo systemctl enable docker

docker-composeインストール

curlインストール

sudo apt install curl

以下で最新バージョンを確認
https://github.com/docker/compose/releases

1.26.0を最新バージョンに変更して以下を実行する

sudo curl -L https://github.com/docker/compose/releases/download/1.26.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Dockerグループへユーザー追加

dockerという名のグループを作ってユーザをそこに所属させればOKです。

sudo groupadd docker
getent group docker
sudo gpasswd -a $USER docker
sudo systemctl restart docker

再起動すると反映される。

インストール確認

docker -v
docker-compose -v
2
4
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
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?