Skip to content

Commit 01b4555

Browse files
authored
docs: add rendering hook and fix broken links (distribution#4247)
2 parents 1611bd2 + 5e75227 commit 01b4555

File tree

20 files changed

+64
-64
lines changed

20 files changed

+64
-64
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ jobs:
3939
set: |
4040
*.cache-from=type=gha,scope=docs
4141
*.cache-to=type=gha,scope=docs,mode=max
42-
env:
43-
DOCS_BASEURL: ${{ steps.pages.outputs.base_path }}
4442
- name: Fix permissions
4543
run: |
4644
chmod -c -R +rX "./build/docs" | while read line; do

docker-bake.hcl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,8 @@ target "image-all" {
9191
]
9292
}
9393

94-
variable "DOCS_BASEURL" {
95-
default = null
96-
}
97-
9894
target "_common_docs" {
9995
dockerfile = "./dockerfiles/docs.Dockerfile"
100-
args = {
101-
DOCS_BASEURL = DOCS_BASEURL
102-
}
10396
}
10497

10598
target "docs-export" {

dockerfiles/docs.Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ COPY --from=hugo $GOPATH/bin/hugo /bin/hugo
1616
WORKDIR /src
1717

1818
FROM build-base AS build
19-
ARG DOCS_BASEURL=/
2019
RUN --mount=type=bind,rw,source=docs,target=. \
21-
hugo --gc --minify --destination /out -b $DOCS_BASEURL
20+
hugo --gc --minify --destination /out
2221

2322
FROM build-base AS server
2423
COPY docs .
@@ -29,8 +28,12 @@ FROM scratch AS out
2928
COPY --from=build /out /
3029

3130
FROM wjdp/htmltest:v0.17.0 AS test
31+
# Copy the site to a public/distribution subdirectory
32+
# This is a workaround for a limitation in htmltest, see:
33+
# https://github.com/wjdp/htmltest/issues/45
34+
WORKDIR /test/public/distribution
35+
COPY --from=build /out .
3236
WORKDIR /test
33-
COPY --from=build /out ./public
3437
ADD docs/.htmltest.yml .htmltest.yml
3538
RUN --mount=type=cache,target=tmp/.htmltest \
3639
htmltest

docs/content/about/configuration.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -434,17 +434,17 @@ The `storage` option is **required** and defines which storage backend is in
434434
use. You must configure exactly one backend. If you configure more, the registry
435435
returns an error. You can choose any of these backend storage drivers:
436436

437-
| Storage driver | Description |
438-
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
439-
| `filesystem` | Uses the local disk to store registry files. It is ideal for development and may be appropriate for some small-scale production applications. See the [driver's reference documentation](/storage-drivers/filesystem). |
440-
| `azure` | Uses Microsoft Azure Blob Storage. See the [driver's reference documentation](/storage-drivers/azure). |
441-
| `gcs` | Uses Google Cloud Storage. See the [driver's reference documentation](/storage-drivers/gcs). |
442-
| `s3` | Uses Amazon Simple Storage Service (S3) and compatible Storage Services. See the [driver's reference documentation](/storage-drivers/s3). |
437+
| Storage driver | Description |
438+
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
439+
| `filesystem` | Uses the local disk to store registry files. It is ideal for development and may be appropriate for some small-scale production applications. See the [driver's reference documentation](../storage-drivers/filesystem.md). |
440+
| `azure` | Uses Microsoft Azure Blob Storage. See the [driver's reference documentation](../storage-drivers/azure.md). |
441+
| `gcs` | Uses Google Cloud Storage. See the [driver's reference documentation](../storage-drivers/gcs.md). |
442+
| `s3` | Uses Amazon Simple Storage Service (S3) and compatible Storage Services. See the [driver's reference documentation](../storage-drivers/s3.md). |
443443

444444
For testing only, you can use the [`inmemory` storage
445-
driver](/storage-drivers/inmemory).
445+
driver](../storage-drivers/inmemory.md).
446446
If you would like to run a registry from volatile memory, use the
447-
[`filesystem` driver](/storage-drivers/filesystem)
447+
[`filesystem` driver](../storage-drivers/filesystem.md)
448448
on a ramdisk.
449449

450450
If you are deploying a registry on Windows, a Windows volume mounted from the
@@ -593,7 +593,7 @@ security.
593593

594594

595595
For more information about Token based authentication configuration, see the
596-
[specification](/spec/auth/token).
596+
[specification](../spec/auth/token.md).
597597

598598
### `htpasswd`
599599

@@ -1100,7 +1100,7 @@ proxy:
11001100

11011101
The `proxy` structure allows a registry to be configured as a pull-through cache
11021102
to Docker Hub. See
1103-
[mirror](/recipes/mirror)
1103+
[mirror](../recipes/mirror.md)
11041104
for more information. Pushing to a registry configured as a pull-through cache
11051105
is unsupported.
11061106

docs/content/about/deploying.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A registry is an instance of the `registry` image, and runs within Docker.
99

1010
This topic provides basic information about deploying and configuring a
1111
registry. For an exhaustive list of configuration options, see the
12-
[configuration reference](../configuration).
12+
[configuration reference](configuration.md).
1313

1414
If you have an air-gapped datacenter, see
1515
[Considerations for air-gapped registries](#considerations-for-air-gapped-registries).
@@ -27,7 +27,7 @@ The registry is now ready to use.
2727
> **Warning**: These first few examples show registry configurations that are
2828
> only appropriate for testing. A production-ready registry must be protected by
2929
> TLS and should ideally use an access-control mechanism. Keep reading and then
30-
> continue to the [configuration guide](../configuration) to deploy a
30+
> continue to the [configuration guide](configuration.md) to deploy a
3131
> production-ready registry.
3232
3333
## Copy an image from Docker Hub to your registry
@@ -94,7 +94,7 @@ To configure the container, you can pass additional or modified options to the
9494
`docker run` command.
9595

9696
The following sections provide basic guidelines for configuring your registry.
97-
For more details, see the [registry configuration reference](../configuration).
97+
For more details, see the [registry configuration reference](configuration.md).
9898

9999
### Start the registry automatically
100100

@@ -166,8 +166,8 @@ $ docker run -d \
166166
By default, the registry stores its data on the local filesystem, whether you
167167
use a bind mount or a volume. You can store the registry data in an Amazon S3
168168
bucket, Google Cloud Platform, or on another storage back-end by using
169-
[storage drivers](/storage-drivers). For more information, see
170-
[storage configuration options](../configuration#storage).
169+
[storage drivers](../storage-drivers/_index.md). For more information, see
170+
[storage configuration options](configuration.md#storage).
171171

172172
## Run an externally-accessible registry
173173

@@ -252,13 +252,13 @@ The registry supports using Let's Encrypt to automatically obtain a
252252
browser-trusted certificate. For more information on Let's Encrypt, see
253253
[https://letsencrypt.org/how-it-works/](https://letsencrypt.org/how-it-works/)
254254
and the relevant section of the
255-
[registry configuration](../configuration#letsencrypt).
255+
[registry configuration](configuration.md#letsencrypt).
256256

257257
### Use an insecure registry (testing only)
258258

259259
It is possible to use a self-signed certificate, or to use our registry
260260
insecurely. Unless you have set up verification for your self-signed
261-
certificate, this is for testing only. See [run an insecure registry](../insecure).
261+
certificate, this is for testing only. See [run an insecure registry](insecure.md).
262262

263263
## Run the registry as a service
264264

@@ -462,20 +462,20 @@ using htpasswd, all authentication attempts will fail.
462462
{{< hint type=note title="X509 errors" >}}
463463
X509 errors usually indicate that you are attempting to use
464464
a self-signed certificate without configuring the Docker daemon correctly.
465-
See [run an insecure registry](../insecure).
465+
See [run an insecure registry](insecure.md).
466466
{{< /hint >}}
467467

468468
### More advanced authentication
469469

470470
You may want to leverage more advanced basic auth implementations by using a
471-
proxy in front of the registry. See the [recipes list](/recipes/).
471+
proxy in front of the registry. See the [recipes list](../recipes/_index.md).
472472

473473
The registry also supports delegated authentication which redirects users to a
474474
specific trusted token server. This approach is more complicated to set up, and
475475
only makes sense if you need to fully configure ACLs and need more control over
476476
the registry's integration into your global authorization and authentication
477-
systems. Refer to the following [background information](/spec/auth/token) and
478-
[configuration information here](../configuration#auth).
477+
systems. Refer to the following [background information](../spec/auth/token.md) and
478+
[configuration information here](configuration.md#auth).
479479

480480
This approach requires you to implement your own authentication system or
481481
leverage a third-party implementation.
@@ -572,9 +572,9 @@ artifacts.
572572

573573
More specific and advanced information is available in the following sections:
574574

575-
- [Configuration reference](../configuration)
576-
- [Working with notifications](../notifications)
577-
- [Advanced "recipes"](/recipes)
578-
- [Registry API](/spec/api)
579-
- [Storage driver model](/storage-drivers)
580-
- [Token authentication](/spec/auth/token)
575+
- [Configuration reference](configuration.md)
576+
- [Working with notifications](notifications.md)
577+
- [Advanced "recipes"](../recipes/_index.md)
578+
- [Registry API](../spec/api.md)
579+
- [Storage driver model](../storage-drivers/_index.md)
580+
- [Token authentication](../spec/auth/token.md)

docs/content/about/garbage-collection.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ that certain layers no longer exist on the filesystem.
2121

2222
Filesystem layers are stored by their content address in the Registry. This
2323
has many advantages, one of which is that data is stored once and referred to by manifests.
24-
See [here](../compatibility#content-addressable-storage-cas) for more details.
24+
See [here](compatibility.md#content-addressable-storage-cas) for more details.
2525

2626
Layers are therefore shared amongst manifests; each manifest maintains a reference
2727
to the layer. As long as a layer is referenced by one manifest, it cannot be garbage
2828
collected.
2929

3030
Manifests and layers can be `deleted` with the registry API (refer to the API
31-
documentation [here](/spec/api#deleting-a-layer) and
32-
[here](/spec/api#deleting-an-image) for details). This API removes references
31+
documentation [here](../spec/api.md#deleting-a-layer) and
32+
[here](../spec/api.md#deleting-an-image) for details). This API removes references
3333
to the target and makes them eligible for garbage collection. It also makes them
3434
unable to be read via the API.
3535

docs/content/about/insecure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ This is more secure than the insecure registry solution.
7272

7373
Be sure to use the name `myregistry.domain.com` as a CN.
7474

75-
2. Use the result to [start your registry with TLS enabled](../deploying#get-a-certificate).
75+
2. Use the result to [start your registry with TLS enabled](deploying.md#get-a-certificate).
7676

7777
3. Instruct every Docker daemon to trust that certificate. The way to do this
7878
depends on your OS.

docs/content/about/notifications.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pushes and pulls and layer pushes and pulls. These actions are serialized into
1010
events. The events are queued into a registry-internal broadcast system which
1111
queues and dispatches events to [_Endpoints_](#endpoints).
1212

13-
![Workflow of registry notifications](../../images/notifications.png)
13+
![Workflow of registry notifications](/distribution/images/notifications.png)
1414

1515
## Endpoints
1616

@@ -45,7 +45,7 @@ The above would configure the registry with an endpoint to send events to
4545
5 failures happen consecutively, the registry backs off for 1 second before
4646
trying again.
4747

48-
For details on the fields, see the [configuration documentation](../configuration/#notifications).
48+
For details on the fields, see the [configuration documentation](configuration.md#notifications).
4949

5050
A properly configured endpoint should lead to a log message from the registry
5151
upon startup:

docs/content/recipes/apache.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Usually, that includes enterprise setups using LDAP/AD on the backend and a SSO
1212

1313
### Alternatives
1414

15-
If you just want authentication for your registry, and are happy maintaining users access separately, you should really consider sticking with the native [basic auth registry feature](/about/deploying#native-basic-auth).
15+
If you just want authentication for your registry, and are happy maintaining users access separately, you should really consider sticking with the native [basic auth registry feature](../about/deploying.md#native-basic-auth).
1616

1717
### Solution
1818

docs/content/recipes/mirror.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ proxy:
107107
108108
> **Warning**: For the scheduler to clean up old entries, `delete` must
109109
> be enabled in the registry configuration. See
110-
> [Registry Configuration](/about/configuration) for more details.
110+
> [Registry Configuration](../about/configuration.md) for more details.
111111

112112
### Configure the Docker daemon
113113

0 commit comments

Comments
 (0)