Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleDocker 실행
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo service docker start
Redirecting to /bin/systemctl start docker.service

[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo usermod -a -G docker ec2-user

[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo setfacl -m user:ec2-user:rw /var/run/docker.sock
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ docker info
Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 20.10.17
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc version: 1e7bb5b773162b57333d57f612fd72e3f8612d94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.130-118.517.amzn2.x86_64
 Operating System: Amazon Linux 2
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 30.57GiB
 Name: ip-172-16-193-106.ap-northeast-2.compute.internal
 ID: ZV5A:7MFV:I4DE:6SVV:WL5M:Z6GJ:YZ5H:B2I4:GK7H:MA5H:BIXM:OCWC
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
Code Block
titleService 등록
[ec2-user@ip-xxx-xxx-xxx-xxx ~]$ sudo systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
Code Block
titleDocker-compose Install
[ec2-user@ip ~]$ sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 42.4M  100 42.4M    0     0  6584k      0  0:00:06  0:00:06 --:--:-- 9534k
[ec2-user@ip ~]$ sudo chmod +x /usr/local/bin/docker-compose
Code Block
titleGit Install
[ec2-user@ip ~]$ sudo yum install git -y