<p>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 <a href="https://stackoverflow.com/questions/43038060/deploy-angular-2-to-apache-server">Deploy Angular 2 to Apache Server</a>.  These types of server modifications will need to be baked into your Dockerfile.</p>

CC BY-SA 4.0
2019-09-18T16:42:53.103Z
2019-09-18T16:42:53.103Z
Wesley Rolnick
<p>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 </p>

<p>I want it to be deployed in Apache using alpine as a base image </p>

<dockerfile><nginx><apache-httpd>
Deploy dist file in docker file
Madan
# Deploy dist file in docker file

(Asked by: username_0 on 2019-09-18)

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

**Tags:** dockerfile, nginx, apache-httpd


---

## 1 answers

### Answer by username_1 on 2019-09-18. Score: 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](https://stackoverflow.com/questions/43038060/deploy-angular-2-to-apache-server). These types of server modifications will need to be baked into your Dockerfile.


---

