[docker]コマンド
# docker pull ubuntu
Using default tag: latest
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
dockerサービスが起動されてない事が原因でした。
# systemctl start docker.service
# systemctl enable docker.service
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
# docker pull ubuntu
Using default tag: latest
latest: Pulling from library/ubuntu
d3938036b19c: Pull complete
a9b30c108bda: Pull complete
67de21feec18: Pull complete
817da545be2b: Pull complete
d967c497ce23: Pull complete
Digest: sha256:9ee3b83bcaa38xxxxxxxxxxxx
Status: Downloaded newer image for ubuntu:latest
コンテナを作成する
# docker run -it ubuntu
プロンプトが変わった。これでUbuntuが起動したらしい。root@d182c8xxxx:/#
root@d182c8xxxx:/# exit
exitで元のホストに戻る。
次はこのコマンド。
# docker-machine ip default
bash: docker-machine: command not found...
コンテナから一時的に出る
Ctrl + p -> (Ctrl押したまま) q
# docker ps
docker導入(別の記事のコマンドメモ)
rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
yum -y install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install docker-io
yum -y install docker-compose