Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit c2de316

Browse files
committed
docs: update code-hints for compatibility with "rouge"
Unlike GitHub's web-UI, the "rouge" hightlighter used in our online documentation is case-sensitive. As a result, code-blocks having the Dockerfile (uppercase) code-hint were not highlighted. This changes those to use lowercase, which is supported by both. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 824a9ce64bd5d5f82c74d4f9e3d35cd2d28c33e5) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 6a02465f4c2d928e4e47757a29c1ae909185ee31 Component: cli
1 parent 5b82935 commit c2de316

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

components/cli/docs/extend/EBS_volume.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To learn more about Rexray: [https://github.com/codedellemc/rexray](https://gith
2727

2828
The following is the Dockerfile used to containerize rexray.
2929

30-
```Dockerfile
30+
```dockerfile
3131
FROM debian:jessie
3232
RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates
3333
RUN wget https://dl.bintray.com/emccode/rexray/stable/0.6.4/rexray-Linux-x86_64-0.6.4.tar.gz -O rexray.tar.gz && tar -xvzf rexray.tar.gz -C /usr/bin && rm rexray.tar.gz

components/cli/docs/reference/builder.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ builds [refer to the documentation in the BuildKit repository](https://github.co
146146

147147
Here is the format of the `Dockerfile`:
148148

149-
```Dockerfile
149+
```dockerfile
150150
# Comment
151151
INSTRUCTION arguments
152152
```
@@ -167,7 +167,7 @@ Docker treats lines that *begin* with `#` as a comment, unless the line is
167167
a valid [parser directive](#parser-directives). A `#` marker anywhere
168168
else in a line is treated as an argument. This allows statements like:
169169

170-
```Dockerfile
170+
```dockerfile
171171
# Comment
172172
RUN echo 'we are running some # of cool things'
173173
```
@@ -197,14 +197,14 @@ Due to these rules, the following examples are all invalid:
197197

198198
Invalid due to line continuation:
199199

200-
```Dockerfile
200+
```dockerfile
201201
# direc \
202202
tive=value
203203
```
204204

205205
Invalid due to appearing twice:
206206

207-
```Dockerfile
207+
```dockerfile
208208
# directive=value1
209209
# directive=value2
210210

@@ -213,15 +213,15 @@ FROM ImageName
213213

214214
Treated as a comment due to appearing after a builder instruction:
215215

216-
```Dockerfile
216+
```dockerfile
217217
FROM ImageName
218218
# directive=value
219219
```
220220

221221
Treated as a comment due to appearing after a comment which is not a parser
222222
directive:
223223

224-
```Dockerfile
224+
```dockerfile
225225
# About my dockerfile
226226
# directive=value
227227
FROM ImageName
@@ -231,15 +231,15 @@ The unknown directive is treated as a comment due to not being recognized. In
231231
addition, the known directive is treated as a comment due to appearing after
232232
a comment which is not a parser directive.
233233

234-
```Dockerfile
234+
```dockerfile
235235
# unknowndirective=value
236236
# knowndirective=value
237237
```
238238

239239
Non line-breaking whitespace is permitted in a parser directive. Hence, the
240240
following lines are all treated identically:
241241

242-
```Dockerfile
242+
```dockerfile
243243
#directive=value
244244
# directive =value
245245
# directive= value
@@ -334,7 +334,7 @@ handled as an instruction, cause it be treated as a line continuation. The resul
334334
of this dockerfile is that second and third lines are considered a single
335335
instruction:
336336

337-
```Dockerfile
337+
```dockerfile
338338
FROM microsoft/nanoserver
339339
COPY testfile.txt c:\\
340340
RUN dir c:\
@@ -602,7 +602,7 @@ and use it to cross-compile to the target platform inside the stage.
602602
`FROM` instructions support variables that are declared by any `ARG`
603603
instructions that occur before the first `FROM`.
604604

605-
```Dockerfile
605+
```dockerfile
606606
ARG CODE_VERSION=latest
607607
FROM base:${CODE_VERSION}
608608
CMD /code/run-app
@@ -616,7 +616,7 @@ can't be used in any instruction after a `FROM`. To use the default value of
616616
an `ARG` declared before the first `FROM` use an `ARG` instruction without
617617
a value inside of a build stage:
618618

619-
```Dockerfile
619+
```dockerfile
620620
ARG VERSION=latest
621621
FROM busybox:$VERSION
622622
ARG VERSION
@@ -851,13 +851,13 @@ ports and map them to high-order ports.
851851

852852
By default, `EXPOSE` assumes TCP. You can also specify UDP:
853853

854-
```Dockerfile
854+
```dockerfile
855855
EXPOSE 80/udp
856856
```
857857

858858
To expose on both TCP and UDP, include two lines:
859859

860-
```Dockerfile
860+
```dockerfile
861861
EXPOSE 80/tcp
862862
EXPOSE 80/udp
863863
```
@@ -1491,7 +1491,7 @@ group (or GID) to use when running the image and for any `RUN`, `CMD` and
14911491
> On Windows, the user must be created first if it's not a built-in account.
14921492
> This can be done with the `net user` command called as part of a Dockerfile.
14931493
1494-
```Dockerfile
1494+
```dockerfile
14951495
FROM microsoft/windowsservercore
14961496
# Create Windows user in the container
14971497
RUN net user /add patrick
@@ -1735,7 +1735,7 @@ these arguments inside the build stage redefine it without value.
17351735

17361736
For example:
17371737

1738-
```Dockerfile
1738+
```dockerfile
17391739
FROM alpine
17401740
ARG TARGETPLATFORM
17411741
RUN echo "I'm building for $TARGETPLATFORM"

components/cli/docs/reference/commandline/build.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ When building a Dockerfile with multiple build stages, `--target` can be used to
487487
specify an intermediate build stage by name as a final stage for the resulting
488488
image. Commands after the target stage will be skipped.
489489

490-
```Dockerfile
490+
```dockerfile
491491
FROM debian AS build-env
492492
...
493493

@@ -555,7 +555,7 @@ desired files to a new scratch stage with [`COPY --from`](../builder.md#copy).
555555
The example `Dockerfile` below uses a separate stage to collect the
556556
build-artifacts for exporting:
557557

558-
```Dockerfile
558+
```dockerfile
559559
FROM golang AS build-stage
560560
RUN go get -u github.com/LK4D4/vndr
561561

@@ -718,7 +718,7 @@ true
718718

719719
The following is an example of docker build with `--squash` argument
720720

721-
```Dockerfile
721+
```dockerfile
722722
FROM busybox
723723
RUN echo hello > /hello
724724
RUN echo world >> /hello

components/cli/docs/reference/commandline/pull.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Status: Downloaded newer image for ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25c
167167

168168
Digest can also be used in the `FROM` of a Dockerfile, for example:
169169

170-
```Dockerfile
170+
```dockerfile
171171
FROM ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
172172
MAINTAINER some maintainer <maintainer@example.com>
173173
```

0 commit comments

Comments
 (0)