dockerfile: fix syntax highlighting
This commit is contained in:
parent
65dee86302
commit
3e1d6d425a
|
@ -2,6 +2,7 @@
|
||||||
title: Dockerfile
|
title: Dockerfile
|
||||||
category: Devops
|
category: Devops
|
||||||
layout: 2017/sheet
|
layout: 2017/sheet
|
||||||
|
prism_languages: [docker]
|
||||||
updated: 2018-03-17
|
updated: 2018-03-17
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -10,28 +11,28 @@ updated: 2018-03-17
|
||||||
|
|
||||||
### Inheritance
|
### Inheritance
|
||||||
|
|
||||||
```
|
```docker
|
||||||
FROM ruby:2.2.2
|
FROM ruby:2.2.2
|
||||||
```
|
```
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
```
|
```docker
|
||||||
ENV APP_HOME /myapp
|
ENV APP_HOME /myapp
|
||||||
RUN mkdir $APP_HOME
|
RUN mkdir $APP_HOME
|
||||||
```
|
```
|
||||||
|
|
||||||
### Initialization
|
### Initialization
|
||||||
|
|
||||||
```
|
```docker
|
||||||
RUN bundle install
|
RUN bundle install
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```docker
|
||||||
WORKDIR /myapp
|
WORKDIR /myapp
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```docker
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
# Specification for mount point
|
# Specification for mount point
|
||||||
```
|
```
|
||||||
|
@ -43,7 +44,7 @@ COPY --chown=user:group host_file.xyz /path/container_file.xyz
|
||||||
|
|
||||||
### Onbuild
|
### Onbuild
|
||||||
|
|
||||||
```bash
|
```docker```
|
||||||
ONBUILD RUN bundle install
|
ONBUILD RUN bundle install
|
||||||
# when used with another file
|
# when used with another file
|
||||||
```
|
```
|
||||||
|
@ -79,7 +80,7 @@ LABEL version="1.0"
|
||||||
```docker
|
```docker
|
||||||
LABEL "com.example.vendor"="ACME Incorporated"
|
LABEL "com.example.vendor"="ACME Incorporated"
|
||||||
LABEL com.example.label-with-value="foo"
|
LABEL com.example.label-with-value="foo"
|
||||||
```docker
|
```
|
||||||
|
|
||||||
```docker
|
```docker
|
||||||
LABEL description="This text illustrates \
|
LABEL description="This text illustrates \
|
||||||
|
|
Loading…
Reference in New Issue