Installing Docker

Docker is available on many different operating systems, including most modern Linux distributions, like Ubuntu, and even Mac OSX and Windows. For more information about how to install Docker on your particular operating system, go to the Docker installation guide.

You don't even need a local development system to use Docker. If you are using Amazon EC2 already, you can launch an Amazon Linux instance and install Docker to get started.

To install Docker on an Amazon Linux instance

  1. Launch an instance with the Amazon Linux AMI. For more information, see Launching an Instance in the Amazon EC2 User Guide for Linux Instances.

  2. Connect to your instance. For more information, see Connect to Your Linux Instance in theAmazon EC2 User Guide for Linux Instances.

  3. Update the installed packages and package cache on your instance.

    [ec2-user ~]$ sudo yum update -y
  4. Install Docker.

    [ec2-user ~]$ sudo yum install -y docker
  5. Start the Docker service.

    [ec2-user ~]$ sudo service docker start
    Starting cgconfig service:                                 [  OK  ]
    Starting docker:	                                   [  OK  ]
  6. Add the ec2-user to the docker group so you can execute Docker commands without using sudo.

    [ec2-user ~]$ sudo usermod -a -G docker ec2-user
  7. Log out and log back in again to pick up the new docker group permissions.

  8. Verify that the ec2-user can run Docker commands without sudo.

    [ec2-user ~]$ docker info
    Containers: 2
    Images: 24
    Storage Driver: devicemapper
     Pool Name: docker-202:1-263460-pool
     Pool Blocksize: 65.54 kB
     Data file: /var/lib/docker/devicemapper/devicemapper/data
     Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
     Data Space Used: 702.3 MB
     Data Space Total: 107.4 GB
     Metadata Space Used: 1.864 MB
     Metadata Space Total: 2.147 GB
     Library Version: 1.02.89-RHEL6 (2014-09-01)
    Execution Driver: native-0.2
    Kernel Version: 3.14.27-25.47.amzn1.x86_64
    Operating System: Amazon Linux AMI 2014.09


'IT이야기' 카테고리의 다른 글

/lib/ld-linux.so.2: bad ELF interpreter 에러 발생시  (0) 2016.08.24
VI 에디터 명령어  (0) 2016.08.17
Docker이용해서 mysql설치  (0) 2016.07.14
Linux 초기화 파일 실행 순서  (0) 2016.07.14
도커 설치 및 실행  (0) 2016.07.06

+ Recent posts