This optimizes the Dockerfile a bit by;
- putting the docs archives at the top to
optimize caching and to prevent having
to clone the github repository on each
build. Note that '--no-cache' is needed
to forcefully break the cache, but the
archives should not frequently change
- grouping RUN lines to reduce image size.
- using a loop for the archived versions to
reduce the amount of duplicated code.
- using the local files for the *current*
version of the docs instead of the git
clone from GitHub. this makes it also
use the right source instead of "master"
- adding a .dockerignore to prevent busting
the cache if not needed, and to prevent
uploading the '.git' repository, which
is not used for the "current" docs
Difference in size before/after;
REPOSITORY TAG IMAGE ID CREATED SIZE
docs latest 36f6ad029e6a 3 minutes ago 1.722 GB
docs-orig latest 4f1a3e3fda4f 16 minutes ago 3.344 GB
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
`$IMAGE_NAME` is actually `$DOCKER_REPO:$DOCKER_TAG`, not `$DOCKER_REPO/$DOCKER_TAG`. This mistake confused me and made me think that `$DOCKER_REPO` was something like `index.docker.io/MyName` rather than `index.docker.io/MyName/MyProject`.
When one wants to remove an image no longer needed (as in the subsequent example w.r.t. nginx), but still used by a stopped container, one would not find that container using only `docker ps`. Introduction of `docker ps -a` seems warranted to me here.
* live-restore unsupported on Windows
Replaced heading with note. Review comment implementation
Fixes doc for https://github.com/docker/docker/issues/28295
Added quote formatting for a note
* Moved the note, some rewording
The situation is actually more complicated than that. If you develop Linux containers on Windows, you can still use Live Restore. So I tried to make it more clear.
Also moved the note to the top of the file since there is no point making people read a whole long thing if it won't work for them.
fixed some line numbering
backed out changes to d4mac, since the issue only applies to windows
Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>