O'Reilly logo

Hands-On Full Stack Web Development with Aurelia by Erikson Haziz Murrugarra Sifuentes, Diego Jose Arguelles Rojas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating our Dockerfile

Our Dockerfile contains the receipt to build a Docker image with all the configuration we need to start our NGINX web server and also will contain the web application that has to be copied inside the container. Go ahead and create the Dockerfile file in the project root folder:

FROM nginx:alpineCOPY default.conf /etc/nginx/conf.d/default.confCOPY index.html /usr/share/nginx/html/index.htmlCOPY dist /usr/share/nginx/html/scripts

Yeah, that's all! This is a simple Docker file that uses nginx:alphine as its base image. We COPY the default.conf file, which contains the NGINX configuration file, and, finally, we COPY our web application files.

That's it! let's build our Docker image and run our very first container.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required