Intellipaat Back

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

Can I have an Angular app on Docker container?

1 Answer

0 votes
by (106k points)
edited by

Yes, of course, you can use Angular app on Docker container. 

Below are some ways you can host Angular inside a Docker container:-

  1. You need to pull a Node base image.

  2. After that copy the package.json file into a working directory inside the container

  3. Now run npm install to download the dependencies mentioned in package.json

  4. Copy your project directory, codes and other dependencies inside the same working directory in your container.

  5. Expose port numbers for mapping docker and host ports

  6. You need to run npm start to start the container.

If you want to learn Docker then I would suggest you must take up the following Docker Training Course. Here is a video tutorial for you which I would suggest you must watch to learn all the basic concepts of Docker.

Want to become an Angular expert? Join this Angular Course now!

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...