Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker private repo with multiple images

Tags:

docker

Can we host multiple images on single private repo ?

Like

  1. ubuntu:12.04
  2. ubuntu:14.04

So My private repo like MYREPO:ubuntu:12.04 and ubuntu:14.04

like image 279
abaid778 Avatar asked Jul 02 '15 11:07

abaid778


1 Answers

Yes.

# Create a container
docker run --name image1 -it busybox echo Image1
# Commit container to new image
docker commit image1 amjibaly/stuff:image1
# Push to dockerhub repo
docker push amjibaly/stuff:image1

# Create a second container
docker run --name image2 -it busybox echo Image2
# Commit container to new image
docker commit image2 amjibaly/stuff:image2
# Push to same dockerhub repo with different tag
docker push amjibaly/stuff:image2
like image 189
Abdullah Jibaly Avatar answered Oct 19 '22 00:10

Abdullah Jibaly