-
Notifications
You must be signed in to change notification settings - Fork 15
/
summary.Rmd
41 lines (40 loc) · 1.63 KB
/
summary.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Summary
1. Use available tools
a. Use ready-made images (e.g. from Docker Hub)
b. Dockerfile generators (e.g. repo2docker)
c. Linters
d. Tools for templating
2. Build upon existing images
a. Use version-specific tags
b. Publish your own images with version tags
3. Format for clarity
a. Use indentation, line breaks and unabbreviated arguments
b. Clarity is better than brevity
c. Group related commands
4. Document within the Dockerfile
a. Add comments explaining the instructions
b. Use labels for metadata
c. Include usage instructions
5. Specify software versions
a. Pin system library versions
b. Explictly list package versions to install
c. Comment why each is needed
6. Use version control
a. Use Continuous Integration and automated testing
b. Include scripts (and requirements.txt) in the same repository
7. Mount datasets at run time
a. Use bind mounts for accessibility
b. Keep large or sensitive datasets out with `.dockerignore`
c. Document expected mounts for external resources
8. Make the image one-click runnable
a. Set default behaviour with `CMD` and `ENTRYPOINT`
b. Document how to use it interactively
9. Order the instructions
a. Least --> most changable for caching and fast builds
b. Regularly use `--no-cache` to catch problems
10. Regularly use and rebuild containers
a. Use the container throughout each project for confidence in your workflow
b. Rebuild every 1-2 weeks to catch problems
c. Provide a `Makefile` or script for convenience
d. Ask a colleague to try it
e. Publicly archive the image used for the publication