Assignment 2 Day 2

List out all INSTRUCTION statement of dockerfile and give one line explanation
FROM
MAINTAINER
RUN
CMD
LABEL
EXPOSE
ENV
ADD
COPY
ENTRYPOINT
VOLUME
USER
WORKDIR
ARG
ONBUILD
STOPSIGNAL
HEALTHCHECK
SHELL

Q2. Build all these 5 images and run container and observe the use cases of it.
https://devopsschool.com/tutorial/docker/dockerfile/dockerfile-example-sample-lab.html

Q3. Write a example dockerfile with 2 CMD, 2 ENTRYPOINT and 1 CMD/1ENTRYPOINT and write down a behavior of it.
if ENTRYPOINT is not specified, default is /bin/sh, what is specified in CMD is passed as args.
2 CMD -> last one is executed
CMD echo “Hello world1”
CMD echo “Hello world2”

Output: Hello world2

2 ENTRYPOINT -> last one is executed
ENTRYPOINT [“/bin/echo”, “Hello1”]
ENTRYPOINT [“/bin/echo”, “Hello2”]
Output: Hello2


1 CMD/ 1 ENTRYPOINT
CMD echo “Hello world”
ENTRYPOINT [“/bin/echo”, “Hello2”]

Output: Hello2 /bin/sh -c echo “Hello world”

List out number of storage/volume drivers supported by docker?
Volume driver allows to abstract the underlying storage system. The storage can be local, network or cloud.
Volume driver plugins example:
Azure File Storage Plugin
VMware vSphere Storage Plugin
Netshare plugin
OpenStorage plugin