본문 바로가기
Development/Docker

[Docker] Image Build / Push / Pull (도커이미지 빌드 / 푸쉬 / 풀)

by 성딱이 2021. 9. 30.
반응형
0. Docker Login
$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username (jmnote): sjh
Password: ****
Login Succeeded
docker info | grep Username
Username: sjh

 

 

1. Docker Image Build

1.1. Dockerfile 작성

FROM tensorflow/tensorflow:2.5.1-gpu

RUN pip install --upgrade pip \
	matplotlib \
	pandas \
	numpy \
	pymysql \
	jupyter \
&& apt-get -y install tmux

 

1.2. Docker Image Build

$ docker build -t [DockerHub ID]/[ImageName]:[Tag] [도커파일위치]

# docker build -t sjh/tensorflow:v1.1 .

 

2. Docker Image Push
$ docker push [DockerHub ID]/[ImageName]:[Tag]

# docker push sjh/tensorflow:v1.1

 

3. Docker Image Pull
$ docker pull [DockerHub ID]/[ImageName]:[Tag]

# docker pull sjh/tensorflow:v1.1
반응형

댓글