BuildKit allows using alternative Dockerfile syntaxes to introduce new features
without having to update Docker itself. The general recommendation is to always
specify a "syntax" directive in a Dockerfile, so that (if needed) older versions
of Docker can download the correct syntax to build the Dockerfile.
This updates our examples to include a syntax directive, to make users more familiar
with these directives, and to illustrate best-pracitces in our documentation.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Unifying all "examples" in this directory; some of these should still be
reviewed and/or removed in favor of examples from "awesome compose"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* add compatibility notes for docker multistage build
add note that multistage docker builds are supported from version 17.05 and upwards.
(this is according to the release notes https://docs.docker.com/engine/release-notes/17.05/)
* Minor update
Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
See https://web.dev/external-anchors-use-rel-noopener/
Using noopener, as that addresses the security issue. "noreferer" blocks
the REFERER header, which may still be useful for some target URLs.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This is a bit of a draft, but I came across this issue in the documentation. When I searched for `docker apt-get` I found this page and copy-pasted the first example, but then I remembered it's best practice to install all packages at once and after that clear the `lists` to minimize the image size. Putting the example with all best practices first might help newer docker users to produce smaller images.
The `ENV key value` form can be ambiguous, for example, the following defines
a single env-variable (`ONE`) with value `"TWO= THREE=world"`:
ENV ONE TWO= THREE=world
While we cannot deprecate/remove that syntax (as it would break existing
Dockerfiles), we should reduce exposure of the format in our examples.
Also updating some code-blocks that were missing language-hints
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Updates on the page hyperlinks
updates statements in both
## Develop new apps on Docker
## Learn about language-specific app development with Docker
* Minor style edits
Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
Unfortunately, the only reliable way to create internal links
is to use relative links to other Markdown files. This does
match the way links on GitHub work, but makes it harder to
create these links.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Fix incorrect links in compose section
there's a bug causing wrapped links to not work, and replacing
some links to point to the .md file, so that IDE's can check
if the anchors are valid. Also replaced some links to point
to their new location.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* engine/swarm: update links
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Fix various broken links
There's a bug in the "jekyll-relative-links" plugin that causes wrapped links to not work.
Also replacing some links to point to the .md file, so that IDE's can check if the anchors
are valid. Finally, replaced some links to point to their new locations, so that users don't
get redirected..
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Remove the "Develop your apps on Docker" section, as there
was only a single section.
- Shorten titles in the navigation: the page itself still
has the full title. Some titles also didn't match the
title on the page.
- Changed "Docker build enhancements for 18.09" to
"Build images with BuildKit" to help discovery of the
BuildKit back-end.
- Some minor (Markdown) touch-ups of the BuildKit topic.
- Moved "Create a base image" lower in the navigation,
because it's an advanced topic that most users won't
be using (generally, using the official base images
from Docker Hub would be recommended).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Update Get started docs
* update part-1, add redirects
* draft updates to part 2 and 3
* tidy up the orchestration topics
* update examples, and other minor edits
* address Stefan's review comments
* moved orchestration to a new node
* fix Ben's review comments
* add email verification step
* Emphasize the CTA in part 3
If you try and build an image without a FROM instruction in the Dockerfile, the Docker daemon will throw an error. You must include "FROM scratch" to build a base image.
"io" needs to be imported, in order to avoid " undefined: io" error.
(go version: go1.12.5 linux/amd64)
P.S: import statements are reordered/formatted (gofmt).
Cheers
I read the previous wording as "Only works when run from a Linux host", where what it means is "Only works when building a Linux container".
In other words, build enhancements work just fine if building Linux containers via Docker for Mac/Windows.
This removes references to obsolete versions of Docker, and rewrites
the section on building from a Dockerfile piped through `stdin`.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>