Difficulty: Beginner
Estimated Time: 10 minutes

Docker demo

Step 1 of 3

Step 1

Copy the following snippet to the Dockerfile:

FROM nginx:1.11-alpine
COPY index.html /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

FROM: base image. It's recommended that you always use a particular version number as your tag and manage the updating yourself.

COPY: This is extremely useful for source code and assets that you want to be deployed inside your containe

EXPOSE: With our files copied into our image and any dependencies downloaded, you need to define which port application needs to be accessible on.

CMD: defines the default command to run when a container is launched

Copy the following snippet to the index.html:

Hello Dojo!