Commit Graph

57 Commits

Author SHA1 Message Date
CrazyMax d775c8a6bf
build: multi-stage builds
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-09-15 13:37:37 +02:00
Milan van Wouden 67e9850c77
Fix horizontal scroll for mobile view
**Issue**: An inline code block (single back-ticks) was too large, causing the width to be exceeded and a horizontal scrollbar to be included.

**Solution**: The inline code (single case) was transformed to a distinct code block (using triple back-ticks), which does not produce the same issue.

The issue was found for:
- Browser: Firefox Daylight 101.2.0
- OS: Android 10
- Phone resolution: 1440x2880 pixels

> When previewing the file on github, the inline code is properly split over multiple lines. However, this is not the case for the [docker docs webpage](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user).
2022-06-24 13:31:30 +02:00
Usha Mandya b3e792e495 Update Docker official images and DVPP references
Signed-off-by: Usha Mandya <usha.mandya@docker.com>
2021-08-19 00:01:01 +01:00
Sebastiaan van Stijn 1583678203
Add missing code-hints, and minor markdown edits
- Add missing code-hints (console, yaml)
- Consistently add an empty line after code-blocks
- Combine some examples where the output and the command were
  put in separate blocks. With the "console" code-hint, this
  is no longer nescessary.
- fix indentation in cloud/ecs-integration.md, which caused the
  numbered-list to be interrupted.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-16 12:59:23 +02:00
Sebastiaan van Stijn ba54a6519e
develop/develop-images: use "console" for shell examples
This allows for easier copying of the commands, without selecting the
prompt.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-06 17:19:55 +02:00
Usha Mandya f857e80221
Merge pull request #12938 from lirantal/patch-1
Feat: adding Node.js specific learning resources for developers building with Docker
2021-07-23 10:47:08 +01:00
Sebastiaan van Stijn 5011f61213
Fix Dockerfile COPY/ADD examples without a trailing slash
When copying files to a destination directory, the classic builder requires
the destination to have a trailing slash (to indicate the target is a _directory_.
not a filename). BuildKit is a bit more flexible in this, and will assume the
target is a directory, but users following the example with buildkit disabled
might see an error message, e.g.:

    Sending build context to Docker daemon  3.072kB
    Step 1/2 : FROM busybox
     ---> 69593048aa3a
    Step 2/2 : COPY *.go .
    When using COPY with more than one source file, the destination must be a directory and end with a /

It doesn't hurt to be explicit, so this patch updates some examples to prevent
this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-21 12:03:31 +02:00
Nils Breunese f21afebf4b
Alpine Linux is no longer under 5 MB
`alpine:latest` is currently 5.61 MB.
2021-06-08 13:54:31 +02:00
Liran Tal 8e80ec3dc0
Feat: adding Node.js specific learn resources 2021-06-02 17:32:45 +03:00
Kickimanjaro 0d5c87d584
#12800
This initially looked like a typo (reported in #12800) but I believe it is actually just an extra word that can be removed.
2021-05-05 10:43:19 -06:00
Sebastiaan van Stijn e22984f7d4
use Dockerfile "syntax" directive in examples
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>
2021-04-20 10:19:12 +02:00
Itamar Turner-Trauring bce3cbf09d
Stop telling people not to install security updates 2021-03-25 08:41:05 -04:00
Mossroy b968f80922
Fix minor typo in example of documentation
I suppose the directory where to extract postgresql should be called postgres instead of postgress
2021-03-12 22:01:48 +01:00
Henare Degan 8889138246
Fix typo in Dockerfile Best Practices ENV section
The example below this change shows that the ENV value can be dumped so I think this was a typo saying that the ENV value can't be dumped.
2021-02-10 14:14:40 +11:00
Sebastiaan van Stijn c119ed174e
Use https:// for links and examples
Found these using `http://[^lp10\*`<][^o]` (to exclude "localhost" and IP-addresses)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 12:09:11 +02:00
Duncan Ogilvie 62cf39dfbf
Make first apt example follow all best practices
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.
2020-09-28 22:55:35 +02:00
Sebastiaan van Stijn f6adc80d9a
remove examples for ENV key value without '='
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>
2020-09-23 15:16:35 +02:00
Sebastiaan van Stijn 9cd60d843e
develop: use relative markdown links
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>
2020-04-23 13:03:15 +02:00
ajay143444 7bd9befce0
contained by changed to contained in (#10663)
contained by changed to contained in
2020-04-22 09:09:22 +01:00
Sebastiaan van Stijn 331554f4b3
Fix various links that were generating URLs with `.md` (#10548)
* 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>
2020-04-01 12:05:50 +01:00
Sebastiaan van Stijn 14bbe621e5
Update markdown language hints to work with "rouge"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-17 14:49:51 +01:00
Shivang Goswami 94879d3ac2
In line 657,it should be can't instead of can
"Can" in place of "can't" is making the meaning of the paragraph confusing.In additional,it is in contrast with the example provided.
2019-12-24 22:33:28 +05:30
Jose J. Escobar 3279c447b6 Update dockerfile_best-practices.md (#9335)
Just two typos
2019-09-02 18:50:06 +01:00
linchiwei123 041a31c3b8 fix COPY failed (#9234)
since README.md listed in https://github.com/docker-library/hello-world/blob/master/.dockerignore , you will get COPY failed without this change.
2019-08-16 11:32:39 +01:00
Wojtek Wrona d5293c2191 Update dockerfile_best-practices.md (#7336)
LGTM, thanks!
2019-07-12 14:08:46 -07:00
David Ye a2e2846b6c
Fix typo 2019-04-01 23:56:55 -07:00
L-Hudson a1ec36d825
Merge pull request #8428 from thaJeztah/remove_old_docker_reference
remove references to obsolete versions, and rewrite stdin section
2019-03-11 09:01:44 -04:00
Sebastiaan van Stijn c6af9fd588
Fix incorrect example in "dockerfile best practices"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-08 18:06:52 +01:00
Sebastiaan van Stijn 195c6983df
touch-up Markdown formatting and highlighting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-08 17:37:23 +01:00
Sebastiaan van Stijn 8e71348370
remove references to obsolete versions, and rewrite stdin section
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>
2019-03-08 17:04:39 +01:00
Maria Bermudez 48cf507e7c
Syntax error in frontmatter 2018-12-20 16:18:58 -08:00
Maria Bermudez 0aa5ac51f4
Remove smart quotes 2018-12-20 11:19:01 -08:00
Maria Bermudez 04d6c618a3
Merge branch 'master' into issue#7592 2018-12-20 11:13:10 -08:00
Maria Bermudez 4bdcbf8ae9 Merge branch 'master' of github.com:docker/docker.github.io 2018-12-10 12:41:24 -08:00
Jeffrey Morgan 5cdb36d5a1 Merge branch 'master' of github.com:docker/docker.github.io 2018-12-03 15:14:51 -05:00
morihaya 29428eeced fix COPY file name 2018-12-03 14:29:53 +09:00
Maria Bermudez 24019d9d85
Remove default assertion for dash shell 2018-11-29 15:05:11 -08:00
Maria Bermudez 9114fc2a7b Revert "Merge pull request #7735 from crgaurav/patch-1"
This reverts commit 81ac3e8bdf, reversing
changes made to d79dc1d84f.
2018-11-29 14:58:17 -08:00
Jeffrey Morgan c0656fa7fa Rename official repos to official images 2018-11-21 15:19:50 -05:00
Gaurav Sharma f7e90e31d4
Update dockerfile_best-practices.md 2018-11-21 22:10:08 +05:30
Gaurav Sharma 862562f9e6
change dash to bash.
in this file, I have seen dash instead of bash.
2018-11-21 22:07:48 +05:30
imedqq b1654c157c Replaced curly quotes in command samples with regular quotes 2018-10-31 14:33:01 -04:00
imedqq 17c97dab59 Replaced curly quotes in command samples with regular quotes 2018-10-31 14:22:57 -04:00
Maria Bermudez aaca9b83b5 Revert "Revert "Merge branch 'master' of github.com:docker/docs-private into test-branch-2""
This reverts commit 4c95d161ca.
2018-08-29 19:01:03 -07:00
Maria Bermudez 4c95d161ca Revert "Merge branch 'master' of github.com:docker/docs-private into test-branch-2"
This reverts commit af5f2fcc38, reversing
changes made to 338b690d26.
2018-08-29 18:37:44 -07:00
Maria Bermudez 840c167055 Revert "Revert "Merge branch 'master' of github.com:docker/docs-private into test-branch-2""
This reverts commit 14080c18bd.
2018-08-29 18:36:03 -07:00
Maria Bermudez 14080c18bd Revert "Merge branch 'master' of github.com:docker/docs-private into test-branch-2"
This reverts commit af5f2fcc38, reversing
changes made to 338b690d26.
2018-08-29 14:47:31 -07:00
Douglas Naphas c45de66122
Grammar corrections in Best Practices 2018-07-14 07:46:47 -04:00
Franco Victorio 25127f46cc Update dockerfile_best-practices.md
Add missing tag names.
2018-06-14 14:30:33 -07:00
Jason Zhekov b58ec64c2e Update dead link in dockerfile_best-practices 2018-06-14 14:22:01 -07:00