DEV Community

yasiga
yasiga

Posted on

Docker Image creation and pushing to DockerHub

Hello everyone!!
To create a docker image,create new file with name of Dockerfile with no extension.We have to create image from base docker image, give work directory and COPY to copy files from local to docker image.We can also install the required softwares to that docker using RUN statement.
Open Dockerdesktop app
To build the docker image that created using use command
docker build -t username/projectname:v1 .
To run the docker image that build using command
docker run username/projectname:v1
To push the docker image that is running using command
docker push username/projectname:v1



Top comments (1)

Collapse
 
praveen_nareshit_323 profile image
Praveen Nareshit

Nice explanation