0 votes
1 view
in Devops and Agile by (28.1k points)

If I want to push the docker container to the docker hub repository should I have to convert that container into the image and push it or can I directly push the container without converting it into image?

Please clarify my doubt.

1 Answer

0 votes
by (48k points)

Run an Ubuntu container, you're basically pulling the ubuntu container from online and say you make a change to it (like installing software into it). Now, just like in GitHub, before you push your changes, you've to 'commit' them.
 

Just committing the changes you've made to the container shall make a container that is ready to be pushed. And, no additional building is required.
 

To commit, use: 

sudo docker commit <container-id> username/container-name-that-you-want

To push, use:

sudo docker push username/same-container-name-that-you've-specified-above.

For more information, check out this Docker Tutorial.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...