Dockerでubuntuを単純にインストール
Vagrant環境内のDockerでUbuntuをインストールする
このコマンドでsudoをしなくてよくなるらしい。
dockerグループにvagrantユーザーを追加する。
ubuntuのイメージを探す。
ダウンロードしたイメージの確認。
参考: Ubuntu 18.04にDockerをインストールして使用する方法 dockerコマンド一覧
このコマンドでsudoをしなくてよくなるらしい。
dockerグループにvagrantユーザーを追加する。
$ sudo usermod -aG docker vagrant
ubuntuのイメージを探す。
$ docker search ubuntu NAME DESCRIPTION STARS OFFICIAL AUTOMATED ubuntu Ubuntu is a Debian-based Linux operating sys… 10978 [OK] dorowu/ubuntu-desktop-lxde-vnc Docker image to provide HTML5 VNC interface … 435 [OK] rastasheep/ubuntu-sshd Dockerized SSH service, built on top of offi… 244 [OK] consol/ubuntu-xfce-vnc Ubuntu container with "headless" VNC session… 220 [OK] ubuntu-upstart Upstart is an event-based replacement for th… 109 [OK] ansible/ubuntu14.04-ansible Ubuntu 14.04 LTS with ansible 98 [OK] neurodebian NeuroDebian provides neuroscience research s… 68 [OK] 1and1internet/ubuntu-16-nginx-php-phpmyadmin-mysql-5 ubuntu-16-nginx-php-phpmyadmin-mysql-5 50 [OK] ubuntu-debootstrap debootstrap --variant=minbase --components=m… 44 [OK] nuagebec/ubuntu Simple always updated Ubuntu docker images w… 24 [OK] i386/ubuntu Ubuntu is a Debian-based Linux operating sys… 21 1and1internet/ubuntu-16-apache-php-5.6 ubuntu-16-apache-php-5.6 14 [OK] 1and1internet/ubuntu-16-apache-php-7.0 ubuntu-16-apache-php-7.0 13 [OK] eclipse/ubuntu_jdk8 Ubuntu, JDK8, Maven 3, git, curl, nmap, mc, … 12 [OK] 1and1internet/ubuntu-16-nginx-php-phpmyadmin-mariadb-10 ubuntu-16-nginx-php-phpmyadmin-mariadb-10 11 [OK] 1and1internet/ubuntu-16-nginx-php-5.6-wordpress-4 ubuntu-16-nginx-php-5.6-wordpress-4 7 [OK] 1and1internet/ubuntu-16-apache-php-7.1 ubuntu-16-apache-php-7.1 6 [OK] darksheer/ubuntu Base Ubuntu Image -- Updated hourly 5 [OK] 1and1internet/ubuntu-16-nginx-php-7.0 ubuntu-16-nginx-php-7.0 4 [OK] pivotaldata/ubuntu A quick freshening-up of the base Ubuntu doc… 4 pivotaldata/ubuntu16.04-build Ubuntu 16.04 image for GPDB compilation 2 1and1internet/ubuntu-16-sshd ubuntu-16-sshd 1 [OK] pivotaldata/ubuntu-gpdb-dev Ubuntu images for GPDB development 1 1and1internet/ubuntu-16-php-7.1 ubuntu-16-php-7.1 1 [OK] smartentry/ubuntu ubuntu with smartentry 1 [OK]
$ docker pull ubuntu
ダウンロードしたイメージの確認。
$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE ubuntu latest 1d622ef86b13 6 weeks ago 73.9MB
$ docker run -it ubuntu root@0b278c499633:/# exit exit すぐに停止。 $ docker stop 0b278c499633 0b278c499633 起動 $ docker start 0b278c499633 bashログイン $ docker exec -it 0b278c499633 bash
参考: Ubuntu 18.04にDockerをインストールして使用する方法 dockerコマンド一覧
コメント
コメントを投稿