Docker : 이미지를 DockerHub 저장소에 올리는 법

김나현·2024년 8월 27일

Docker

목록 보기
2/7

이미지를 DockerHub 저장소에 올리는 법

  1. 컨테이너 생성
    docker run -it --name ubuntu-test ubuntu:latest

  2. 이미지 생성
    docker commit ubuntu-test ubuntu-iamge:1.2.2
    docker tag ubuntu-image:1.2.2 nxxyxxn/ubuntu-linux:1.0

  3. 이미지 리스트 확인 (생성 확인)
    docker images 이미지 리스트 확인

  4. 이미지로 실행 ?
    docker run -it --name ubuntu nxxyxxn/ubuntu-linux:1.0

  5. 파일 생성
    cd~ ls
    echo "sample file" > sample.txt
    ls 파일 생성 확인
    exit

  6. 저장소에 Push
    docker push nxxyxxn/ubuntu-linux:1.0

저장소에 push 된 것 확인

profile
ヾ(•ω•`)o 노력하자

0개의 댓글