mirror of https://github.com/docker/cli.git
Don't put dockerfiles in one continuous code block
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
This commit is contained in:
parent
da80c0929a
commit
090ad2bb8a
|
@ -1166,45 +1166,50 @@ or a signal name in the format SIGNAME, for instance SIGKILL.
|
||||||
|
|
||||||
## Dockerfile examples
|
## Dockerfile examples
|
||||||
|
|
||||||
# Nginx
|
```
|
||||||
#
|
# Nginx
|
||||||
# VERSION 0.0.1
|
#
|
||||||
|
# VERSION 0.0.1
|
||||||
|
|
||||||
FROM ubuntu
|
FROM ubuntu
|
||||||
MAINTAINER Victor Vieux <victor@docker.com>
|
MAINTAINER Victor Vieux <victor@docker.com>
|
||||||
|
|
||||||
LABEL Description="This image is used to start the foobar executable" Vendor="ACME Products" Version="1.0"
|
LABEL Description="This image is used to start the foobar executable" Vendor="ACME Products" Version="1.0"
|
||||||
RUN apt-get update && apt-get install -y inotify-tools nginx apache2 openssh-server
|
RUN apt-get update && apt-get install -y inotify-tools nginx apache2 openssh-server
|
||||||
|
```
|
||||||
|
|
||||||
# Firefox over VNC
|
```
|
||||||
#
|
# Firefox over VNC
|
||||||
# VERSION 0.3
|
#
|
||||||
|
# VERSION 0.3
|
||||||
|
|
||||||
FROM ubuntu
|
FROM ubuntu
|
||||||
|
|
||||||
# Install vnc, xvfb in order to create a 'fake' display and firefox
|
# Install vnc, xvfb in order to create a 'fake' display and firefox
|
||||||
RUN apt-get update && apt-get install -y x11vnc xvfb firefox
|
RUN apt-get update && apt-get install -y x11vnc xvfb firefox
|
||||||
RUN mkdir ~/.vnc
|
RUN mkdir ~/.vnc
|
||||||
# Setup a password
|
# Setup a password
|
||||||
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
|
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
|
||||||
# Autostart firefox (might not be the best way, but it does the trick)
|
# Autostart firefox (might not be the best way, but it does the trick)
|
||||||
RUN bash -c 'echo "firefox" >> /.bashrc'
|
RUN bash -c 'echo "firefox" >> /.bashrc'
|
||||||
|
|
||||||
EXPOSE 5900
|
EXPOSE 5900
|
||||||
CMD ["x11vnc", "-forever", "-usepw", "-create"]
|
CMD ["x11vnc", "-forever", "-usepw", "-create"]
|
||||||
|
```
|
||||||
|
|
||||||
# Multiple images example
|
```
|
||||||
#
|
# Multiple images example
|
||||||
# VERSION 0.1
|
#
|
||||||
|
# VERSION 0.1
|
||||||
|
|
||||||
FROM ubuntu
|
FROM ubuntu
|
||||||
RUN echo foo > bar
|
RUN echo foo > bar
|
||||||
# Will output something like ===> 907ad6c2736f
|
# Will output something like ===> 907ad6c2736f
|
||||||
|
|
||||||
FROM ubuntu
|
FROM ubuntu
|
||||||
RUN echo moo > oink
|
RUN echo moo > oink
|
||||||
# Will output something like ===> 695d7793cbe4
|
# Will output something like ===> 695d7793cbe4
|
||||||
|
|
||||||
# You᾿ll now have two images, 907ad6c2736f with /bar, and 695d7793cbe4 with
|
|
||||||
# /oink.
|
|
||||||
|
|
||||||
|
# You᾿ll now have two images, 907ad6c2736f with /bar, and 695d7793cbe4 with
|
||||||
|
# /oink.
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue