Linux-ububtu64-bit installation docker

Source: Internet
Author: User
Tags curl ssh docker ps docker hub docker run

Installation: Looks like only 64-bit support

sudo apt-get install Docker

sudo apt-get install

sudo apt-get install Docker-registry


Create a system container and connect remotely1. Terminal command Docker pull rastasheep/ubuntu-sshd, download with SSH service to the system image;2. Start Container Docker run-itd-p16888: A-H jason_sshd_test--name="docker_001"rastasheep/ubuntu-sshd Bash;3. container Docker Exec-it docker_001 bash;4. Modify the Ubuntu password to passwd;5the container has been modified to save the pre-image. Docker Stop docker_001 stop container to do; Docker commit docker_001 DOCKER_V1, submit image;6. Docker EXEC again-it docker_001 bash into the container;7. Restart the container SSH service, inside the container console output service SSH restart;8. docker external Terminal output command SSH [email protected] 16888 Remote connection, complete. Create a simple Web container1Find Nginx Image Docker search Nginx on the Docker hub; 2. Pull the image of the official, Docker pulls Nginx; 3. Mirroring the shipping container Docker run-p the: the-d nginx? Command description:-P the: the: Map The 80 end of the container to the end of the host?--name Mynginx: Name the container Mynginx4. Command Docker exec Mynginx bash into the container;5. Command nginx inside the container;6Outside the container, view the container boot situation via browser orCurl accesses Curl ' '. dockerfile introduction and make? (Build Nginx container via Dockerfile)1. Create a nginx,mkdir-p ~/nginx/www ~/nginx/logs ~/nginx/conf;2. Create dockerfile;3. Build the image so that the. Command Docker Build-t Mynginx.;4. To view the image, make the command Docker images Mynginx, complete.

You need root permission to run Docker, you can do this

sudo groupadd docker #添加docker用户组

sudo gpasswd-a $USER Docker #将登陆用户加入到docker用户组中

Newgrp Docker #更新用户组

Docker PS #测试docker命令是否可以使用sudo正常使用

Linux-ububtu64-bit installation docker

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.