Commit Graph

399 Commits

Author SHA1 Message Date
Guillaume Lours b92ebe5fbf
Replace docker-compose calls (#17881)
* use 'docker compose' instead of 'docker-compose' in Swarm documentation

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>

* replace old usages of 'docker-compose' by 'docker compose'

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>

---------

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-08-08 10:05:39 +01:00
David Karlsson 2d44be0fc0 ci: replace htmlproofer with wjdp/htmltest
Signed-off-by: David Karlsson <david.karlsson@docker.com>
2023-04-12 15:38:51 +02:00
CrazyMax 27f7130024
Dockerfile: remove htmlproofer workaround for buildx_build
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-13 15:25:37 +01:00
Sebastiaan van Stijn a7b9985e00
engine: update reference docs (yaml), and fix anchor links
The updated version uses new anchors for flags, so updates are needed
elsewhere to update those anchors.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-09 10:29:43 +01:00
Sebastiaan van Stijn e19b56d856
htmlproofer: temporarily exclude engine/commandline/cli
This page will be updated once the associated PR in docker/cli is merged.
Excluding it until then.

    Running ["LinkCheck", "ImageCheck", "ScriptCheck"] on ["./_site"] on *.html...

    Ran on 2173 files!

    - ./_site/engine/reference/commandline/cli/index.html
      *  linking to internal hash #format-the-output that does not exist (line 314)
         <a href="/engine/reference/commandline/config_ls/#format-the-output"><strong>format the output</strong> section in the  documentation</a>
      *  linking to internal hash #format-the-output that does not exist (line 318)
         <a href="/engine/reference/commandline/images/#format-the-output"><strong>format the output</strong> section in the  documentation</a>
      *  linking to internal hash #format-the-output that does not exist (line 334)
         <a href="/engine/reference/commandline/secret_ls/#format-the-output"><strong>format the output</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 326)
         <a href="/engine/reference/commandline/plugin_ls/#formatting"><strong>formatting</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 322)
         <a href="/engine/reference/commandline/node_ls/#formatting"><strong>formatting</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 330)
         <a href="/engine/reference/commandline/ps/#formatting"><strong>formatting</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 338)
         <a href="/engine/reference/commandline/service_inspect/#formatting"><strong>formatting</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 342)
         <a href="/engine/reference/commandline/service_ls/#formatting"><strong>formatting</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 346)
         <a href="/engine/reference/commandline/stats/#formatting"><strong>formatting</strong> section in the  documentation</a>

    HTML-Proofer found 9 failures!

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-07 13:41:19 +01:00
Sebastiaan van Stijn 1af8b42db8
htmlproofer: temporarily exclude buildx build
The buildx build docs refers to anchors that are being updated,
but are maintained in a separate repository; exclude that page
from the validator until the anchor changes are live and the
buildx docs updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-07 13:41:16 +01:00
CrazyMax df4abc6472
jekyll: enforce ruby platform to compile gems with native extensions from source
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-11-04 19:16:13 +01:00
CrazyMax 4544982b55
jekyll(last_modified_at): fix for remote resources and data files (#15998)
* Dockerfile: add option to enforce git log history for local dev

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

* jekyll(last_modified_at): do not override if already set with frontmatter

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

* jekyll(last_modified_at): use data files for commands reference instead of stub file

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

* fix broken links

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-31 09:01:42 +01:00
CrazyMax 0001d960fa
Merge pull request #15267 from crazy-max/fix-sitemap-lastmod
jekyll: fix sitemap lastmod
2022-10-26 19:55:23 +02:00
CrazyMax 06908b36f5
jekyll: use git to fetch remote resources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-26 06:12:36 +02:00
Craig Osterhout 2551e2481a
Update Dockerfile
Attempt to fix deploy issue
2022-10-25 15:25:44 -07:00
CrazyMax 897e77c647
add hotjar for staging environment
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-25 20:21:47 +02:00
David Karlsson 8f77e55567 rename master -> main 2022-10-19 15:52:14 +02:00
CrazyMax 561118ec5b
rename docs repository
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-09-29 11:07:53 +02:00
Justin Chadwell ebd4a33866 Add linting information to CONTRIBUTING.md
This adds information on how the docs use linting, and more detailed
instructions on how to enable it in an IDE, using VSCode as a concrete
and widespread example.

Additionally, to do this, we add a duplicate style config for
markdownlint in JSON format for the Node.js implementation of
markdownlint that is used by various editor plugins. These both
implement the same core set of warnings, and appear to function
identically.
2022-08-03 09:58:01 +01:00
Justin Chadwell 0fb1ca91e6 ci: add annotations for mdl and htmlproofer
Add GitHub Actions annotations that will appear in the CI checks - this
should make it easier to see the reasons for the linting failures,
without needing to deep dive into the logs.
2022-08-03 09:58:01 +01:00
Usha Mandya dfa7fc3b8e
Merge pull request #15227 from jedevc/linting-fixup
Fix linting 🎉
2022-08-02 17:35:10 +01:00
CrazyMax d2fca0eb8e
jekyll: move relative URLs fix from Dockerfile to Jekyll plugin
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-28 21:17:02 +02:00
CrazyMax 614c4a7000
jekyll: enable sitemap and local search for dev environment
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-28 19:30:46 +02:00
CrazyMax 01a9362d76
jekyll: fix not expanded DOMAIN env
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-28 15:37:04 +02:00
Justin Chadwell 82c7362754 lint: fix linting to base state 2022-07-28 11:27:10 +01:00
CrazyMax 9c296afa3e
switch to ruby markdownlint and add ci validation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-25 12:17:09 +02:00
CrazyMax 76ab23f915
Bump ruby from 2.6.10 to 2.7.6
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-25 01:03:35 +02:00
CrazyMax 2120bd105d
jekyll: create plugin to update api toc
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-18 18:20:31 +02:00
CrazyMax b65866f2a6
jekyll: create plugin to fetch remote resources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-18 18:20:31 +02:00
CrazyMax 8da7d9445d
dockerfile: containerized htmlproofer
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-13 22:07:58 +02:00
CrazyMax ebd36f7081
dockerfile: enhanced to match netlify pipeline
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-13 22:07:57 +02:00
Guillaume Tardif 82f77a9064
Include extensions-sdk docs from upstream repo (#14658)
* First inclusion of extensions-sdk docs from upstream repo

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>

* Mark extension as Beta, not Preview

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2022-05-04 12:44:44 +01:00
Sebastiaan van Stijn 688134003d
Use 20.10 release branch for upstream engine resources
The 20.10 release branch now exists, and "master" will be used for
Docker Engine 21.xx development.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-25 12:54:54 +01:00
Guillaume Tardif cd5bc70940 Include ACI/ECS reference docs from compose-cli and make them easier to find for docker users
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-04 16:16:12 +01:00
Sebastiaan van Stijn 3ed7250644
Update engine reference for 20.10 release
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-12-09 00:50:04 +01:00
Sebastiaan van Stijn 332ce64398
Disable search auto-complete in development environment
As we don't generate a metadata.json, auto-complete is non-functional,
so disabling the script for previews.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-23 15:22:55 +02:00
Sebastiaan van Stijn 9b79a27ab4
Dockerfile: output Jekyll profile information
Also skip updating sitemap.xml for the development environment.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-23 13:35:12 +02:00
Sebastiaan van Stijn 5a1ae8310f
Separate "development" and "production" configurations
This patch updates the default configuration to match a "development"
situation, and introduces build-options to produce a "production"
build.

By default (dev environment):

- Google Analytics / GTM and PollDaddy are disabled
- SASS builds non-minified stylesheets (for easier readabililty)
- Excludes "enterprise" stubs

Building a "production" build locally is still possible by overriding
the `JEKYLL_ENV` build-arg;

    JEKYLL_ENV=production docker-compose  up --build

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-22 15:41:15 +02:00
Sebastiaan van Stijn cafd5a9943
Use full URLs for canonical links
Canonical links are expected to be full URLs, not relative.

For this to work, the Dockerfile had to be updated, because we're stripping
the domain-name from links ("<a href..."), but the script currently also included
"<link rel='canonical' .." tags.

With the change, canonical links are left alone;

These hrefs will be replaced

    echo '<a class=foo href="https://docs.docker.com/foo">hello</a>' | sed -e 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g'
    # <a class=foo href="/foo">hello</a>
    echo '<a href="https://docs.docker.com/foo">hello</a>' | sed -e 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g'
    # <a href="/foo">hello</a>

But, for example, this one is left alone

    echo '<link rel="canonical" href="https://docs.docker.com/foo/bar" />' | sed -e 's#\(<a[^>]* href="?\)https://docs.docker.com/#\1/#g'
    # <link rel="canonical" href="https://docs.docker.com/foo/bar" />

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-12 13:09:32 +02:00
Sebastiaan van Stijn 29546c24f3
Use absolute URLs in sitemap.xml
We generate the website with relative URLs to allow hosting the content
on preview domains.

However, the sitemap.xml should always contain absolute URLs (including
the domain name).

I couldn't find a way to configure the sitemap URL's separately, so using
the same hack we use for stripping URL's in the HTML.

Before this, the sitemap.xml would contain;

    <url>
        <loc>/engine/reference/commandline/volume_prune/</loc>
    </url>

After this, the full URL is included

    <url>
        <loc>https://docs.docker.com/engine/reference/commandline/volume_prune/</loc>
    </url>

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-25 17:47:34 +02:00
Sebastiaan van Stijn ba85012f47
Remove scripts and assets related to archives
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-24 13:25:58 +02:00
Sebastiaan van Stijn 3f7cab652d
Dockerfile: disable archives by default
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-24 13:25:54 +02:00
Sebastiaan van Stijn 2f2ce53a51
Dockerfile: update to gh-pages 198
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-15 22:44:44 +01:00
Sebastiaan van Stijn b7d91ae175
Dockerfile: use alpine for fetching external resources
This step does not depend on Jekyll, so using a minimal
base-image.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-15 22:43:11 +01:00
Sebastiaan van Stijn 07d410de21
Dockerfile: fix links in same step as generating the files
For intermediate stages, it's generally ok to perform steps
separately, however in this case, fixing the links would
happen every time the HTML was generated, so we might as
well do it in the same step, to reduce the size of the local
build cache, as it was adding 54MB for each rebuild:

    IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
    7d97d86ae290        3 minutes ago       RUN /bin/sh -c find ${TARGET} -type f -name …   53.7MB              buildkit.dockerfile.v0
    <missing>           3 minutes ago       RUN /bin/sh -c jekyll build -d ${TARGET} # b…   375MB               buildkit.dockerfile.v0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-15 18:25:30 +01:00
Sebastiaan van Stijn 20267e58b9
prevent fetching resources when updating _config.yml or toc.yaml
The "fetch-upstream-resources" script also updated the toc.yaml,
based on values in the _config.yml.

As a result, any change in either the "_config.yml" or "toc.yaml"
would also result in the upstream resources to be fetched again.

This patch separates the step to update the toc, so that the
upstream resources can be cached. This _does_ mean that remote
sources can get outdated (only will be rebuilt when changing
ENGINE_BRANCH or DISTRIBUTION_BRANCH). That should not be a
problem for actual deployments, which don't use caching.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-28 14:18:17 +01:00
Sebastiaan van Stijn ab9fe6e98e
Dockerfile: remove "deploybase" stage, and inline instead
The "deploybase" stage was only used for the final stage.

This patch inlines the steps from that stage to the final stage
itself. In the process, changing the order of copying the NGINX
configuration file to _after_ the docs were copied. This prevents
having to copy the archived docs when making a change in the NGINX
configuration. The NGINX configuration file _will_ now be copied
on each rebuild, but the file is small, and as such is still faster
than copying all archives.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-28 14:17:20 +01:00
Sebastiaan van Stijn 40e5ab6009
Dockerfile: don't use intermediate "deploy-source" stage
The "deploy-source" stage was added in a previous refactor. While
this stage is useful to "export" all docs (including archives if
needed), and _convenient_ to collect all those files to the final
stage, it caused a regression in performance.

This patch changes the final ("deploy") to copy the "archives" and
"current" docs separately, so that the archived versions can be
cached in the final stage, and don't have to be copied again on
each rebuild.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-28 14:17:18 +01:00
Sebastiaan van Stijn 7d22d25adf
fetch-upstream-resources: simplify parsing of _config.yml
This part of the script was setting variables for any "_version"
property in the configuration file.

We (currently) only need the engine API version, so simplifying
the code to just do that, and fix some spaces -> tabs indentations.

With this change the script only uses standard (POSIX) scripting,
so switching to use the standard (/bin/sh) shell.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-28 14:17:11 +01:00
Usha Mandya f6b590cbb3
Merge pull request #10351 from thaJeztah/use_local_nginx_conf
Dockerfile: use local nginx configuration
2020-02-25 17:35:59 +00:00
Sebastiaan van Stijn 1763c42608
Dockerfile: use local nginx configuration
The docs/docker.github.io:nginx-onbuild has not been
updated for a while, and having a local file present
allows for easier updating it (for example, to add
wildcard redirects).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-25 18:33:10 +01:00
Sebastiaan van Stijn c78b3bee78
Reduce list of archives to supported enterprise versions
Docker Enterprise actively supports the 17.06, 18.03, 18.09, and
19.03 versions, with 17.06 and 18.03 reaching EOL soon.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-25 17:15:22 +01:00
Sebastiaan van Stijn f2d5f959bc
Dockerfile: add note/todo about use of "toc" and "config"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-25 13:15:09 +01:00
Sebastiaan van Stijn 1f7d4ce871
Remove "svn" env-vars for branches
Don't require these to be set upfront, as we can create them
locally in the fetch-upstream-resources.sh script

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-25 13:15:03 +01:00