Break stuff on purpose. That teaches you a lot about how things that are broken in the inside look from the outside, which will later help you in identifying the root of a problem from the outside.
Example: Try creating a Dockerfile from scratch for... something. Maybe wrap a simple nodejs in one.
Then, after you got it working, go line by line, change something, and see what happens when you docker run. Change port numbers if some are exposed. Change relative to absolute paths. CMD to RUN to ENTRYPOINT.
Top comments (2)
Break stuff on purpose. That teaches you a lot about how things that are broken in the inside look from the outside, which will later help you in identifying the root of a problem from the outside.
Example: Try creating a Dockerfile from scratch for... something. Maybe wrap a simple nodejs in one.
Then, after you got it working, go line by line, change something, and see what happens when you
docker run
. Change port numbers if some are exposed. Change relative to absolute paths.CMD
toRUN
toENTRYPOINT
.Break, fix, repeat.
Thanks. Will try