Reputation: 2101
I try to run the Angular app inside docker with Nginx:
$ ls
dist Dockerfile
Dockerfile:
FROM nginx
COPY ./dist/statistic-ui /usr/share/nginx/html/
Inside dist/statistic-ui/
all app files.
But COPY
command doesn't work, Nginx just starts with default welcome page and when I check files inside /usr/share/nginx/html/
only default Nginx files.
Why COPY
command doesn't work and how to fix it?
UPDATE Run docker container
sudo docker run -d --name ui -p 8082:80 nginx
Upvotes: 0
Views: 150
Reputation: 2492
You need to build an image from your Dockerfile then run a container from that image:
docker build -t angularapp .
docker run -d --name ui -p 8082:80 angularapp
Make sure you include the trailing dot at the end of the docker build command.
Upvotes: 1