Debian Codegraph @

test/syntax/source/code/dockerfile

raw
1 # Example instructions from https://docs.docker.com/reference/builder/
2 FROM ubuntu:14.04
3
4 MAINTAINER [email protected]
5
6 ENV foo /bar
7 WORKDIR ${foo} # WORKDIR /bar
8 ADD . $foo # ADD . /bar
9 COPY \$foo /quux # COPY $foo /quux
10
11 RUN apt-get update && apt-get install -y software-properties-common\
12 zsh curl wget git htop\
13 unzip vim telnet
14 RUN ["/bin/bash", "-c", "echo hello ${USER}"]
15
16 CMD ["executable","param1","param2"]
17 CMD command param1 param2
18
19 EXPOSE 1337
20
21 ENV myName="John Doe" myDog=Rex\ The\ Dog \
22 myCat=fluffy
23
24 ENV myName John Doe
25 ENV myDog Rex The Dog
26 ENV myCat fluffy
27
28 ADD hom* /mydir/ # adds all files starting with "hom"
29 ADD hom?.txt /mydir/ # ? is replaced with any single character
30
31 COPY hom* /mydir/ # adds all files starting with "hom"
32 COPY hom?.txt /mydir/ # ? is replaced with any single character
33
34 ENTRYPOINT ["executable", "param1", "param2"]
35 ENTRYPOINT command param1 param2
36
37 VOLUME ["/data"]
38
39 USER daemon
40
41 LABEL com.example.label-with-value="foo"
42 LABEL version="1.0"
43 LABEL description="This text illustrates \
44 that label-values can span multiple lines."
45
46 WORKDIR /path/to/workdir
47
48 ONBUILD ADD . /app/src