Intellipaat Back

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

How do I develop (not just deploy) with Docker?

1 Answer

0 votes
by (106k points)

Recently I have been using docker effectively for development Web Development.

  1. What I did is created a docker file.

  2. After that, I included the -v to link my source code to an area in the container

  3. I use the -p to link the port from my local ip to a port running the web app in the container (as well as enabling debug ports)

  4. I used -w for the working directory

As a crude example for demoing the important bit to hook up your container for development

Docker run -p 8080:9090 -v $(pwd):/app -w "/app" node npm start

In the above command pwd was used from my source code folder to launch the container (/bin/bash would be your command or put this in a docker file).

If you want to learn Docker you can have a look at the following Docker training Course. You can also read the following Docker tutorial. I am also mentioning a video tutorial for you which you can use to clear all your concepts regarding Docker.  

.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...