-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disussion - Rule 8. End the Dockerfile
with build and run commands
#15
Comments
I concur the ordering of ports in Good point about potentially confusing examples > added to final checks at #7 It would be great if you could help out adding the several example commands where you see fit! I would advice against |
Sorry, yes, I should try to make changes direct. Just a thought that comes to mind on things I've seen from command line that I don't remember offhand are in a rule elsewhere: docker can copy over local context when you build from a local directory, so if you have a huge datafile in the directory, or a subdir with lots of stuff in it (like a |
This is an eminently sensible and practical rule, though it maybe also hints back to Rule 6?
The rationale is to make it easy for a novice to get started; as such, it makes sense to show how to:
Port mapping is something else to mention?
One note: don't do things like map:
-p 8888:8888
; for a novice, if I want to expose on localhost port 8899, which one do I change?I think novices can also be confused by things in
{}
, things prefixed with$
, etc; you also need to take care not to introduce platform shell dependencies in the way things are passed (Windows, Max/Linux vars / commands etc).Generally, I try to remember to give an example of pretty much every likely command switch over several (explained/ contextualised) docker run commands.
If you are making your container available for other people to access from eg dockerhub, also provide a
docker push
command, along with relevant comments about tagging strategies used.The text was updated successfully, but these errors were encountered: