Get a Dockerfile to build the image. For this example, we will be using the following Dockerfile, which installs the nginx web server in an Alpine Linux container:
FROM alpine:3.8
RUN apk add --update nginx && mkdir /tmp/nginx && rm -rf /var/cache/apk/*
EXPOSE 80 443
CMD ["nginx", "-g", "daemon off;"]