Basics of DockerFile
Mimic the steps you would normally take to setup a virtual machine from set point. Saving yourself time by importing a base image in and working on top of that. Each time your dockerfile is built is goes through the set of commands to create that environment.
Contents
- Writing a dockerfile
- Building a dockerfile
- Running a dockerfile
Writing a DockerFile
The docker runs each command in order to build the image. It steps through each command and implements it.
importing a base image
FROM drupal:8.9.13-php7.4-apache
COPY & RUN commands to change the image to your needs.
RUN composer install
COPY web/sites/default/ /opt/drupal/web/sites/default
Building a DockerFile
Running a DockerFile
Setting the network and ports