Mode:
Duration:
1
2
3
4
5
# docker/demo/Dockerfile
FROM nginx:1.21
COPY ./index.html /usr/share/nginx/html/index.html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]Coding works best on desktop or with an external keyboard.
# docker/demo/Dockerfile
FROM nginx:1.21
COPY ./index.html /usr/share/nginx/html/index.html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]Coding works best on desktop or with an external keyboard.
A simple Dockerfile to create an Nginx container image.
# docker/demo/Dockerfile
FROM nginx:1.21
COPY ./index.html /usr/share/nginx/html/index.html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]A Dockerfile is a text file containing a set of instructions to build a Docker image. It defines the base image, application code, dependencies, configuration, and commands to run in a containerized environment.
Origin & Creator
Developed by Docker, Inc. to simplify the creation and distribution of containerized applications.
Industrial Note
Dockerfiles are essential in DevOps and microservices architectures, allowing developers to standardize environments, streamline deployments, and ensure consistent runtime behavior across platforms.