FROM —pulls (includes) dependencies from DockerHub image
LABEL —who the maintainer/guilty party is.
USER —the system user that should be doing the work.
RUN —is used to perform shell commands in the container, for
example, mkdir and sed, as if the container were a
running VM and you were making changes to its filesystem, etc. Each
RUN command creates a new layer in the image (which is
suboptimal); chain your RUN commands together whenever possible.
However, we don't need a RUN command this time.
ADD —is used to copy files or subdirectories into a Docker
image. ADD has the effect of adding a new layer (image) to the
EXPOSE —expose the listed port(s) for mapping to the host via
the -p option when launching a container. This is more
documentary than effectual, but we'll add it. It means basically that
port 8080inside our container will be the one Apache
NiFi listens on. The way this really happens though is via the -p
$ docker run
ENV —update the container's PATH environment
variable in order that CMD may find the command it's going to
execute once the container is running.
CMD —used to run NiFi in the image, along with any arguments.
Allows you to set a default command plus options and arguments that will
be executed only when the container is run. However, if the container is
run with a command on the command line, this command is ignored.