-
FROM: base image
-
RUN: commands to execute.
-
Each RUN instruction will executew the commond on the top writable layer and perform a commit of the image.
-
Aggregate multiple RUN instructions using '&&'
-
-
CMD: defualt commands to run when running the image
-
CMD ping 127.0.0.1 -c 30 #shell form
-
Also exec form TODO: add example…
-
-
YOU CAN USER JUST A PORTION OF THE CONTAINERID ON STOP AND REMOVE
-
ENTRYPOINT: Same as CMD except it can’t be overridden
-
Connect to a running container: docker exec -it [containerid] <cmd>
-
Delete a local docker image
docker rmi [image ID] or docker rmi [repo:tag]
-
docker push didn’t work the first time, this link was helpful. Ended up needing to run:
docker login
prior to my push