Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (47.6k points)

How does Docker build images?

1 Answer

0 votes
by (106k points)

You can follow the below-mentioned steps to learn how to build images:-

  1. Create a folder for the project

  2. Create a file called ‘Dockerfile’

  3. Fill the ‘Dockerfile’ with commands to build your image

  4. use ‘docker build -t app: latest .” to build the image

  5. the image ‘app: latest’ will then be available to run

  6. use ‘docker run app: latest’ to run the image

  7. use ‘docker run -it app: latest’ if you need an ‘interactive ‘terminal

  8. Should be good to go.

Here is a Docker Training Course which you must take up learning Docker and have a valued certificate. For your reference, I am also mentioning a video tutorial to learn all the basics of Docker.

.

Related questions

Browse Categories

...