기술노트
CentOS7 base image생성 (docker) | |
---|---|
작성자 : 관리자(jieun@ehostidc.co.kr) 작성일 : 2020-05-18 조회수 : 3422 | |
1) Dockerfile 작성
from docker.io/centos:7 USER root RUN yum clean all \ && yum repolist \&& yum -y install tar unzip vi vim telnet \&& yum -y install apr apr-util apr-devel apr-util-devel \ && yum -y install net-tools curl openssl elinks locate python-setuptools; yum clean allCMD ["/bin/bash"]
2) CentOS7 image 생성 root@Docker:[~]: yum build –t centos7-base
3) image 확인 root@Docker:[~]: docker images
4) container 백그라운드 실행 root@Docker:[~]: docker run -d -ti centos7-base
5) container 접속 root@Docker:[~]: docker attach a9a740956cf7
6) container 재실행r root@Docker:[~]: docker restart <container ID>
7) container 삭제 root@Docker:[~]: docker rm <container ID> |
|
이전글 | [Hyper-V 복제] 1. Hyper-V설치 |
다음글 | Docker(centos7) 설치 |