How to write a docker file to deploy a dist file of an Angular Application In a server. I see most of them have used nginx as a server. Why is it so? Is there any specific reason

I want it to be deployed in Apache using alpine as a base image

1 Answer 1


There are lots of good tutorials for NGINX and it is an easy server to setup with the Angular router. You can still accomplish this with an Apache server, but you may need more steps in your Dockerfile. As a starting place check out the answer on Stack Overflow Deploy Angular 2 to Apache Server. These types of server modifications will need to be baked into your Dockerfile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.