Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions 404.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ occurred, if applicable.

[**Click here to create a new ticket**](https://github.com/docker/docker.github.io/issues/new){:.newissue.button.primary-btn}


[![404 page not found](/images/404-docs.png)](https://docs.docker.com/ "Go to the homepage")
[![404 page not found](/images/404-docs.png)](/ "Go to the homepage")

<script>
let el = document.querySelector("a.newissue");
Expand Down
2 changes: 1 addition & 1 deletion _includes/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ your client and daemon API versions.

> This command is experimental.
>
> [Experimental features](https://docs.docker.com/engine/reference/commandline/cli/#experimental-features)
> [Experimental features](/engine/reference/commandline/cli/#experimental-features)
> are intended for testing and feedback as their functionality or UX may change
> between releases without warning or can be removed entirely in a future release.
{: .important }
Expand Down
2 changes: 1 addition & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<ul class="footer_links">
<li><b><a href="https://www.docker.com/products/docker-desktop" target="_blank" rel="noopener">Developers</a></b></li>
<li><a href="https://www.docker.com/use-cases" target="_blank" rel="noopener">Use Cases</a></li>
<li><a href="https://docs.docker.com/get-started/" target="_blank" rel="noopener">Get Started</a></li>
<li><a href="/get-started/" target="_blank" rel="noopener">Get Started</a></li>
<li><a href="https://www.docker.com/blog/" target="_blank" rel="noopener">Blog</a></li>
<li><a href="https://www.docker.com/docker-community" target="_blank" rel="noopener">Community</a></li>
<li><a href="https://www.docker.com/open-source" target="_blank" rel="noopener">Open Source</a></li>
Expand Down
16 changes: 6 additions & 10 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
{%- assign page_description = content | strip_html | strip | truncatewords: 30 -%}
{%- endif -%}
{%- endif -%}
{%- assign domain_name = 'https://docs.docker.com' -%}
{%- if jekyll.environment == 'development' -%}
{%- assign domain_name = 'https://localhost:4000' -%}
{%- endif -%}
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{%- if page.sitemap == false or jekyll.environment != 'production' %}
Expand All @@ -37,7 +33,7 @@
<title>{{ page.title | default: page_title }} | Docker Documentation</title>
<meta name="description" content="{{ page.description | default: page_description | escape}}" />
<meta name="keywords" content="{{ page.keywords | default: 'docker, docker open source, docker platform, distributed applications, microservices, containers, docker containers, docker software, docker virtualization' }}">
<link rel="canonical" href="{{ domain_name }}{{ page.url }}" />
<link rel="canonical" href="{{ site.docs_url }}{{ page.url }}" />

<!-- favicon -->
<link rel="icon" type="image/x-icon" href="/favicons/docs@2x.ico" sizes="129x128">
Expand Down Expand Up @@ -96,20 +92,20 @@
<meta name="twitter:title" itemprop="title name" content="{{ page.title | default: page_title }}"/>
<meta name="twitter:description" property="og:description" itemprop="description" content="{{ page_description | escape_once }}" />
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:domain" content="docs.docker.com"/>
<meta name="twitter:domain" content="{{ site.docs_url | replace_first: 'http://', '' | replace_first: 'https://', '' }}"/>
<meta name="twitter:site" content="@docker_docs"/>
<meta name="twitter:url" content="https://twitter.com/docker_docs"/>
<meta name="twitter:image:src" content="https://docs.docker.com/images/docs@2x.png"/>
<meta name="twitter:image:src" content="{{ site.docs_url }}/images/docs@2x.png"/>
<meta name="twitter:image:alt" content="Docker Documentation"/>
<meta property="og:title" content="{{ page.title | default: page_title }}" />
<meta property="og:description" content="{{ page.description | default: page_description | escape_once }}" />
<meta property="og:type" content="website"/>
<meta property="og:updated_time" itemprop="dateUpdated" content="{% if page.date %}{{ page.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %}"/>
<meta property="og:image" itemprop="image primaryImageOfPage" content="https://docs.docker.com/images/docs@2x.png"/>
<meta property="og:image" itemprop="image primaryImageOfPage" content="{{ site.docs_url }}/images/docs@2x.png"/>
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="https://docs.docker.com{{ page.url }}" />
<meta property="og:url" content="{{ site.docs_url }}{{ page.url }}" />
<meta property="og:site_name" content="Docker Documentation" />
<meta property="article:published_time" itemprop="datePublished" content="{% if page.date %}{{ page.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %}"/>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","headline":{{ page.title | default: page_title | jsonify }},"description":{{ page.description | default: page_description | jsonify }},"url":"https://docs.docker.com{{ page.url }}"}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","headline":{{ page.title | default: page_title | jsonify }},"description":{{ page.description | default: page_description | jsonify }},"url":"{{ site.docs_url }}{{ page.url }}"}</script>
<!-- END SEO STUFF -->
</head>
2 changes: 1 addition & 1 deletion _includes/landing-page/dev-environments.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h5>
</h5>
</div>
<div class="col-xs-12 col-md-6 col-lg-4 text-center">
<a class="btn" href="https://docs.docker.com/desktop/dev-environments/" target="_blank" rel="noopener">
<a class="btn" href="/desktop/dev-environments/" target="_blank" rel="noopener">
Check out the details
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _includes/landing-page/docker-pricing.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h5>
</h5>
</div>
<div class="col-xs-12 col-md-6 col-lg-4 text-center">
<a class="btn" href="https://docs.docker.com/subscription/" target="_blank" rel="noopener">
<a class="btn" href="/subscription/" target="_blank" rel="noopener">
Learn more
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _includes/landing-page/extensions-banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h2>
<img src="/images/extensions.PNG" alt="extensions" />
</div>
<div class="col-xs-12 col-md-6 col-lg-4 text-center">
<a class="btn" href="https://docs.docker.com/desktop/extensions-sdk/" target="_blank">
<a class="btn" href="/desktop/extensions-sdk/" target="_blank">
Start building
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _includes/landing-page/volume-management.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h5>
</h5>
</div>
<div class="col-xs-12 col-md-6 col-lg-4 text-center">
<a class="btn" href="https://docs.docker.com/desktop/dashboard/#explore-volumes" target="_blank" rel="noopener">
<a class="btn" href="/desktop/dashboard/#explore-volumes" target="_blank" rel="noopener">
Learn more
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/archive-redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<body>
<h1>{{ page.prod_title }}</h1>
<p>You are viewing an archive branch of the
<a href="https://docs.docker.com/">Docker documentation</a>, but
<a href="/">Docker documentation</a>, but
{{ prod_title }} documentation is not published in the current archive.
<a href="https://docs.docker.com/{{ page.prod_url }}/" target="_blank" rel="noopener">Go to https://docs.docker.com/{{ page.prod_url }}/</a>
<a href="/{{ page.prod_url }}/" target="_blank" rel="noopener">Go to {{ site.docs_url }}/{{ page.prod_url }}/</a>
in a new tab.</p>
</body>
</html>
2 changes: 1 addition & 1 deletion _layouts/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{%- if page.issue_url -%}
{%- assign issue_url = page.issue_url -%}
{%- else -%}
{%- assign issue_url = "https://github.com/docker/docker.github.io/issues/new?body=File: [" | append: page.path | append: "](https://docs.docker.com" | append: page.url | append: ")" -%}
{%- assign issue_url = "https://github.com/docker/docker.github.io/issues/new?body=File: [" | append: page.path | append: "](" | append: site.docs_url | append: page.url | append: ")" -%}
{%- endif -%} -->
<html lang="en">
{%- include head.html -%}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/engine-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="icon" type="image/x-icon" href="/favicons/docs@2x.ico" sizes="129x128" />
<link rel="stylesheet" type="text/css" href="/css/api-reference.css" />
<!-- make the latest API version the canonical page as that's what we want users to be using mostly -->
<link rel="canonical" href="https://docs.docker.com/engine/api/v{{ site.latest_engine_api_version }}/" />
<link rel="canonical" href="{{ site.docs_url }}/engine/api/v{{ site.latest_engine_api_version }}/" />
</head>
<body>
<redoc spec-url="/engine/api/{{ page.name | replace: '.md'}}.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/hub-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="icon" type="image/x-icon" href="/favicons/docs@2x.ico" sizes="129x128" />
<link rel="stylesheet" type="text/css" href="/css/api-reference.css" />
<!-- make the latest API version the canonical page as that's what we want users to be using mostly -->
<link rel="canonical" href="https://docs.docker.com/docker-hub/api/latest/" />
<link rel="canonical" href="{{ site.docs_url }}/docker-hub/api/latest/" />
</head>
<body>
<redoc spec-url="/docker-hub/api/{{ page.name | replace: '.md'}}.yaml" hide-hostname="false" suppress-warnings="false" class="hub-api"></redoc>
Expand Down
13 changes: 6 additions & 7 deletions _layouts/redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
<html lang="en-US">
<meta charset="utf-8">
<title>Redirecting&hellip;</title>
{%- assign redirect_to = page.redirect.to | remove_first: 'https://docs.docker.com' | remove_first: 'http://docs.docker.com' %}
{%- if redirect_to contains "://" %}
<link rel="canonical" href="{{ redirect_to }}">
{%- if page.redirect.to contains "://" %}
<link rel="canonical" href="{{ page.redirect.to }}">
{%- else %}
<link rel="canonical" href="https://docs.docker.com{{ redirect_to }}">
<link rel="canonical" href="{{ site.docs_url }}{{ page.redirect.to }}">
{%- endif %}
<meta http-equiv="refresh" content="0; url={{ redirect_to }}">
<meta http-equiv="refresh" content="0; url={{ page.redirect.to }}">
<meta name="robots" content="noindex">
<h1>Redirecting&hellip;</h1>
<a href="{{ redirect_to }}">Click here if you are not redirected.</a>
<script>location="{{ redirect_to }}"</script>
<a href="{{ page.redirect.to }}">Click here if you are not redirected.</a>
<script>location="{{ page.redirect.to }}"</script>
</html>
12 changes: 12 additions & 0 deletions _plugins/config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require_relative 'util.rb'

module Jekyll
class ConfigGenerator < Generator
safe true
priority :highest

def generate(site)
site.config['docs_url'] = get_docs_url
end
end
end
4 changes: 3 additions & 1 deletion _plugins/fetch_remote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
require 'open-uri'
require 'rake'

require_relative 'util.rb'

module Jekyll
class FetchRemote < Octopress::Hooks::Site
priority :highest
Expand Down Expand Up @@ -104,7 +106,7 @@ def pre_read(site)
next unless File.file?(ent.path) && File.extname(ent.path) == ".md"
# set edit and issue url and remote info for markdown files in site config defaults
edit_url = "#{entry['repo']}/edit/#{entry['default_branch']}/#{file_clean}"
issue_url = "#{entry['repo']}/issues/new?body=File: [#{file_clean}](https://docs.docker.com/#{destent.path.sub(/#{File.extname(destent.path)}$/, '')}/)"
issue_url = "#{entry['repo']}/issues/new?body=File: [#{file_clean}](#{get_docs_url}/#{destent.path.sub(/#{File.extname(destent.path)}$/, '')}/)"
puts " edit_url: #{edit_url}"
puts " issue_url: #{issue_url}"
site.config['defaults'] << {
Expand Down
6 changes: 5 additions & 1 deletion _plugins/fix_swagger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ def post_read(site)
beginning_time = Time.now
Jekyll.logger.info "Starting plugin fix_swagger.rb..."

# TODO: use dynamic URL from util.get_docs_url instead of hardcoded one
# but needs to remove first all absolute URLs in our code base.
docs_url = "https://docs.docker.com"

files = Dir.glob(%w[./docker-hub/api/*.yaml ./engine/api/*.yaml])
Jekyll.logger.info " Fixing up #{files.size} swagger file(s)..."
files.each do |f|
Jekyll.logger.info " #{f}"
text = File.read(f)
replace = text.gsub(get_docs_url, "")
replace = text.gsub(docs_url, "")
File.open(f, "w") { |f2| f2.puts replace }
end

Expand Down
3 changes: 1 addition & 2 deletions _plugins/fix_url.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ def post_write(site)
# but needs to remove first all absolute URLs in our code base.
docs_url = "https://docs.docker.com"

dest = site.config['destination'] || '_site'
files = Dir.glob("#{dest}/**/*.html")
files = Dir.glob("#{site.dest}/**/*.html")
Jekyll.logger.info " Fixing up URLs in #{files.size} html file(s) to be relative"
files.each do|f|
text = File.read(f)
Expand Down
2 changes: 1 addition & 1 deletion compose/compose-file/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,5 +301,5 @@ build:

## Implementations

* [docker-compose](https://docs.docker.com/compose)
* [docker-compose](../../compose/index.md)
* [buildx bake](../../build/bake/index.md)
8 changes: 4 additions & 4 deletions compose/compose-file/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ cgroup_parent: m-executor-abcd
command: bundle exec thin -p 3000
```

The command can also be a list, in a manner similar to [Dockerfile](https://docs.docker.com/engine/reference/builder/#cmd):
The command can also be a list, in a manner similar to [Dockerfile](../../engine/reference/builder.md#cmd):

```
command: [ "bundle", "exec", "thin", "-p", "3000" ]
Expand Down Expand Up @@ -737,7 +737,7 @@ entrypoint: /code/entrypoint.sh
```

The entrypoint can also be a list, in a manner similar to
[Dockerfile](https://docs.docker.com/engine/reference/builder/#cmd):
[Dockerfile](../../engine/reference/builder.md#cmd):

```yml
entrypoint:
Expand Down Expand Up @@ -1082,7 +1082,7 @@ been the case if `group_add` were not declared.

`healthcheck` declares a check that's run to determine whether or not containers for this
service are "healthy". This overrides
[HEALTHCHECK Dockerfile instruction](https://docs.docker.com/engine/reference/builder/#healthcheck)
[HEALTHCHECK Dockerfile instruction](../../engine/reference/builder.md#healthcheck)
set by the service's Docker image.

```yml
Expand Down Expand Up @@ -1756,7 +1756,7 @@ sysctls:
You can only use sysctls that are namespaced in the kernel. Docker does not
support changing sysctls inside a container that also modify the host system.
For an overview of supported sysctls, refer to [configure namespaced kernel
parameters (sysctls) at runtime](https://docs.docker.com/engine/reference/commandline/run/#configure-namespaced-kernel-parameters-sysctls-at-runtime).
parameters (sysctls) at runtime](/engine/reference/commandline/run/#configure-namespaced-kernel-parameters-sysctls-at-runtime).

### tmpfs

Expand Down
7 changes: 3 additions & 4 deletions compose/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2205,8 +2205,8 @@ naming scheme accordingly before upgrading.
You don't have to use it - your existing Compose files will run on Compose
1.6 exactly as they do today.

Check the upgrade guide for full details:
https://docs.docker.com/compose/compose-file#upgrading
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This URL was not valid. We could not catch it with htmlproofer because not solved as link.

Copy link
Contributor

@dockertopia dockertopia Aug 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a line in the file from 2016, probably there were changes in compose-file affecting this.
You say "DOCS_URL env var not being taken into account properly.", how should we take this var into account?
I'm unaware of this topic. cc: @usha-mandya

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You say "DOCS_URL env var not being taken into account properly.", how should we take this var into account?
I'm unaware of this topic. cc: @usha-mandya

DOCS_URL has been added in #15250 to avoid hardcoded URLs that would not match the environment (stage vs lab vs prod). See for example the source of https://docs-stage.docker.com/ and you will see some URLs with docs.docker.com which is not right and should be docs-stage.docker.com.

tldr; this is an internal enhancement that should not impact your workflow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, so to get right base URL according with environment. Thanks for the explanation.

Check the [upgrade guide](../compose/compose-file/compose-versioning.md#upgrading)
for full details.

- Support for networking has exited experimental status and is the recommended
way to enable communication between containers.
Expand All @@ -2217,8 +2217,7 @@ naming scheme accordingly before upgrading.

By default, you don't have to configure any networks. In fact, using
networking with Compose involves even less configuration than using links.
Consult the networking guide for how to use it:
https://docs.docker.com/compose/networking
Consult the [networking guide](../compose/networking.md) for how to use it.

The experimental flags `--x-networking` and `--x-network-driver`, introduced
in Compose 1.5, have been removed.
Expand Down
12 changes: 6 additions & 6 deletions desktop/extensions-sdk/dev/api/reference/interfaces/Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ const containers = await ddClient.docker.listContainers();

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `options?` | `any` | (Optional). A JSON like `{ "all": true, "limit": 10, "size": true, "filters": JSON.stringify({ status: ["exited"] }), }` For more information about the different properties see [the Docker API endpoint documentation](https://docs.docker.com/engine/api/v1.37/#operation/ContainerList). |
| Name | Type | Description |
|:-----------|:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `options?` | `any` | (Optional). A JSON like `{ "all": true, "limit": 10, "size": true, "filters": JSON.stringify({ status: ["exited"] }), }` For more information about the different properties see [the Docker API endpoint documentation](../../../../../../engine/api/v1.37.md#operation/ContainerList). |

#### Returns

Expand All @@ -101,9 +101,9 @@ const images = await ddClient.docker.listImages();

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `options?` | `any` | (Optional). A JSON like `{ "all": true, "filters": JSON.stringify({ dangling: ["true"] }), "digests": true }` For more information about the different properties see [the Docker API endpoint documentation](https://docs.docker.com/engine/api/v1.37/#tag/Image). |
| Name | Type | Description |
|:-----------|:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `options?` | `any` | (Optional). A JSON like `{ "all": true, "filters": JSON.stringify({ dangling: ["true"] }), "digests": true }` For more information about the different properties see [the Docker API endpoint documentation](../../../../../../engine/api/v1.37.md#tag/Image). |

#### Returns

Expand Down
Loading