Skip to content

Commit e308521

Browse files
authored
docs: fix more auto-format casualties (#943)
1 parent 0c53b71 commit e308521

File tree

4 files changed

+58
-63
lines changed

4 files changed

+58
-63
lines changed

.github/workflows/publish-docs.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,4 @@ jobs:
2424
mkdocs-material \
2525
md-toc
2626
- name: Generate docs
27-
run: mkdocs gh-deploy --strict
28-
# - name: Publish docs
29-
# uses: peaceiris/actions-gh-pages@v3
30-
# with:
31-
# github_token: ${{ secrets.GITHUB_TOKEN }}
32-
# publish_dir: ./site
33-
27+
run: mkdocs gh-deploy --strict

docs/index.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p style="text-align: center; margin-left: 1.6rem;">
2-
<img src="./images/logo-450px.png" width="450" />
2+
<img alt="Logotype depicting a lighthouse" src="./images/logo-450px.png" width="450" />
33
</p>
44
<h1 align="center">
55
Watchtower
@@ -48,15 +48,17 @@ and restart it with the same options that were used when it was deployed initial
4848
the following command:
4949

5050
=== "docker run"
51-
```bash $ docker run -d \
52-
--name watchtower \
53-
-v /var/run/docker.sock:/var/run/docker.sock \
54-
containrrr/watchtower
55-
```
51+
```bash
52+
$ docker run -d \
53+
--name watchtower \
54+
-v /var/run/docker.sock:/var/run/docker.sock \
55+
containrrr/watchtower
56+
```
5657
=== "docker-compose.yml"
57-
```yaml version: "3"
58-
services:
59-
watchtower:
60-
image: containrrr/watchtower volumes:
61-
- /var/run/docker.sock:/var/run/docker.sock
62-
```
58+
```yaml
59+
version: "3"
60+
services:
61+
watchtower:
62+
image: containrrr/watchtower volumes:
63+
- /var/run/docker.sock:/var/run/docker.sock
64+
```

docs/lifecycle-hooks.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,21 @@ These labels can be declared as instructions in a Dockerfile (with some example
3131
the `docker run` command line:
3232

3333
=== "Dockerfile"
34-
```docker LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh"
35-
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="/dump-data.sh"
36-
LABEL com.centurylinklabs.watchtower.lifecycle.post-update="/restore-data.sh"
37-
LABEL com.centurylinklabs.watchtower.lifecycle.post-check="/send-heartbeat.sh"
38-
```
34+
```docker
35+
LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh"
36+
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="/dump-data.sh"
37+
LABEL com.centurylinklabs.watchtower.lifecycle.post-update="/restore-data.sh"
38+
LABEL com.centurylinklabs.watchtower.lifecycle.post-check="/send-heartbeat.sh"
39+
```
40+
3941
=== "docker run"
40-
```bash docker run -d \
41-
--label=com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh" \
42-
--label=com.centurylinklabs.watchtower.lifecycle.pre-update="/dump-data.sh" \
43-
--label=com.centurylinklabs.watchtower.lifecycle.post-update="/restore-data.sh" \
44-
someimage --label=com.centurylinklabs.watchtower.lifecycle.post-check="/send-heartbeat.sh" \
45-
```
42+
```bash
43+
docker run -d \
44+
--label=com.centurylinklabs.watchtower.lifecycle.pre-check="/sync.sh" \
45+
--label=com.centurylinklabs.watchtower.lifecycle.pre-update="/dump-data.sh" \
46+
--label=com.centurylinklabs.watchtower.lifecycle.post-update="/restore-data.sh" \
47+
someimage --label=com.centurylinklabs.watchtower.lifecycle.post-check="/send-heartbeat.sh" \
48+
```
4649

4750
### Timeouts
4851
The timeout for all lifecycle commands is 60 seconds. After that, a timeout will

docs/private-registries.md

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -103,43 +103,40 @@ Use the dockerfile below to build the [amazon-ecr-credential-helper](https://git
103103
in a volume that may be mounted onto your watchtower container.
104104
105105
1. Create the Dockerfile (contents below):
106-
107-
```Dockerfile
108-
FROM golang:latest
109-
110-
ENV CGO_ENABLED 0
111-
ENV REPO github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
112-
113-
RUN go get -u $REPO
114-
115-
RUN rm /go/bin/docker-credential-ecr-login
116-
117-
RUN go build \
106+
```Dockerfile
107+
FROM golang:latest
108+
109+
ENV CGO_ENABLED 0
110+
ENV REPO github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
111+
112+
RUN go get -u $REPO
113+
114+
RUN rm /go/bin/docker-credential-ecr-login
115+
116+
RUN go build \
118117
-o /go/bin/docker-credential-ecr-login \
119118
/go/src/$REPO
120-
121-
WORKDIR /go/bin/
122-
```
119+
120+
WORKDIR /go/bin/
121+
```
123122

124123
2. Use the following commands to build the aws-ecr-dock-cred-helper and store it's output in a volume:
125-
126-
```bash
127-
# Create a volume to store the command (once built)
128-
docker volume create helper
129-
130-
# Build the container
131-
docker build -t aws-ecr-dock-cred-helper .
132-
133-
# Build the command and store it in the new volume in the /go/bin directory.
134-
docker run -d --rm --name aws-cred-helper --volume helper:/go/bin aws-ecr-dock-cred-helper
135-
136-
```
124+
```bash
125+
# Create a volume to store the command (once built)
126+
docker volume create helper
127+
128+
# Build the container
129+
docker build -t aws-ecr-dock-cred-helper .
130+
131+
# Build the command and store it in the new volume in the /go/bin directory.
132+
docker run -d --rm --name aws-cred-helper \
133+
--volume helper:/go/bin aws-ecr-dock-cred-helper
134+
```
137135

138136
3. Create a configuration file for docker, and store it in $HOME/.docker/config.json (replace the <AWS_ACCOUNT_ID>
139137
placeholders with your AWS Account ID):
140-
141-
```json
142-
{
138+
```json
139+
{
143140
"credsStore" : "ecr-login",
144141
"HttpHeaders" : {
145142
"User-Agent" : "Docker-Client/19.03.1 (XXXXXX)"
@@ -150,11 +147,10 @@ in a volume that may be mounted onto your watchtower container.
150147
"credHelpers": {
151148
"<AWS_ACCOUNT_ID>.dkr.ecr.us-west-1.amazonaws.com" : "ecr-login"
152149
}
153-
}
154-
```
150+
}
151+
```
155152

156153
4. Create a docker-compose file (as an example) to help launch the container:
157-
158154
```yaml
159155
version: "3.4"
160156
services:

0 commit comments

Comments
 (0)