1. centos 이미지 받기
구글에서 dockerhub centos를 검색하거나 dockerhub를 들어가서 centos를 검색한다.
https://hub.docker.com/_/centos
Centos - Official Image | Docker Hub
Quick reference Supported tags and respective Dockerfile links Quick reference (cont.) CentOS CentOS Linux is a community-supported distribution derived from sources freely provided to the public by Red Hat for Red Hat Enterprise Linux (RHEL). As such, Cen
hub.docker.com
그러면 아래와 같이 도커 허브에서 centos 공식 이미지 페이지를 만날 수 있다.
위 이미지 하단의 Tags를 클릭하게 되면 태그 되어있는 centos의 여러 버전별 이미지를 정렬 또는 검색하여 확인할 수 있다.
원하는 이미지가 있으면 위와 같이 도커 명령어를 복사하여 이미지를 당겨주면 된다.
위와 같이 명령 프롬프트에서 pull 해준 뒤, docker images를 입력하여 pull 받은 이미지를 확인할 수 있다.
2. 이미지 실행 및 버전 확인
아래의 명령어로 다운받은 centos 이미지를 실행시켜준다.
docker run -it centos:latest
이후 centos 설치 버전을 확인해본다.
cat /etc/redhat-release
현재 최신 버전인 8.4.2105 버전으로 실행되었음을 확인할 수 있다.
'Programming' 카테고리의 다른 글
Rancher Desktop 설치 해보기 (0) | 2022.04.23 |
---|---|
도커 컨테이너 볼륨 설정 및 테스트 (로컬 폴더 공유) (0) | 2022.04.23 |
도커 이미지 생성 및 확인 (centos, apache, php) (0) | 2022.04.23 |
도커 centos, apache, php 설치 하기 (docker rancher desktop) (0) | 2022.04.23 |
웹 환경에서 php 동작 방식 (0) | 2022.04.08 |