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>
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>
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>
These checks were now checking the literal "engine_svn_branch" and
"distribution_svn_branch" string, instead of the value of the variables.
This was introduced in 1f7d4ce871 (whoops!)
We currently don't use this functionality, so not a critical bug.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
If you supply the `--interactive` flag to `docker run` the prompt will never come back. That said, if somebody were to run this as a cron job, it would fail as the `ucp-phase2` container name will already exist.
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>
* Remove incorrect difference between user-defined and default bridge
This PR removes the first bullet point from the list differences between user-defined bridge networks and the default bridge network:
[User-defined bridges provide better isolation and interoperability between containerized applications](https://docs.docker.com/network/bridge/#differences-between-user-defined-bridges-and-the-default-bridge).
The default bridge network, similar to user-defined bridges, opens all ports to other containers and allows for inter-container communication by default. This is elaborated and demonstrated in #8973. Other relevant issue: #8437.
* Remove mention of previous bullet point
* Added isolation advantage of user-defined over default network
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>
The docker/docker-ce repository components are only synchronized
periodically with the upstream docker/cli repository.
This patch switches the script to directly use the upstream cli
repository, instead of the docker-ce mono-repo.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Now that the files are named `<api-version>.md`, we no longer need
to set a custom `api_version` property; instead we can use the filename
to detect what API version we're rendering.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The upstream (moby/moby) repository is unifying all API swagger files
to be in the release branch. With that change, it is no longer needed
to fetch each version of the API separately, and instead all versions
can be fetched at once.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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>
The current target didn't have jekyll installed, so mounting the
source-files didn't do anything.
This patch removes the bind-mount.
Alternatively, we could switch back to using a jekyll stage (with
automatic rebuilding).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This patch adds a stage that only contains the generated files. It can
be used to export the generated HTML for hosting the documentation on a
non-containerised service (e.g. to deploy to an s3 bucket).
When using BuildKit, use the `--output` option to build the files and to
copy them to your local filesystem.
For example, to build current docs, including archives:
DOCKER_BUILDKIT=1 docker build --target=deploy-source --output=./_site .
And to build without archives:
DOCKER_BUILDKIT=1 docker build --target=deploy-source --build-arg ENABLE_ARCHIVES=false --output=./_site .
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>