blob: ce18ed7bffbd51b8caf77c1e6676c694b93c33f9 [file] [log] [blame]
Michael Kutý17649402016-03-19 23:57:43 +01001
2======
3Docker
4======
5
6Docker is a platform for developers and sysadmins to develop, ship, and run applications. Docker lets you quickly assemble applications from components and eliminates the friction that can come when shipping code. Docker lets you get your code tested and deployed into production as fast as possible.
7
8Docker is supported on the following systems:
9
10* Debian 8.0 Jessie (64-bit)
11* Ubuntu Trusty 14.04 (LTS) (64-bit)
12* Ubuntu Precise 12.04 (LTS) (64-bit)
13* Ubuntu Raring 13.04 and Saucy 13.10 (64 bit)
14
15Sample pillar
16-------------
17
Filip Pytloune27a90d2016-08-29 14:08:34 +020018Host
19----
20
Michael Kutý17649402016-03-19 23:57:43 +010021.. code-block:: yaml
22
23 docker:
24 host:
25 enabled: true
26
Filip Pytloune27a90d2016-08-29 14:08:34 +020027Client
28------
Michael Kutý17649402016-03-19 23:57:43 +010029
Filip Pytloun96fc0cc2016-08-29 16:01:10 +020030Container
31~~~~~~~~~
32
33.. code-block:: yaml
34
Michael Kutý17649402016-03-19 23:57:43 +010035 docker:
Filip Pytloune27a90d2016-08-29 14:08:34 +020036 client:
Michael Kutý17649402016-03-19 23:57:43 +010037 container:
Filip Pytloun87169542016-08-29 13:38:30 +020038 jenkins:
39 # Don't start automatically
40 start: false
41 restart: unless-stopped
42 image: jenkins:2.7.1
Michael Kutý17649402016-03-19 23:57:43 +010043 ports:
Filip Pytloun87169542016-08-29 13:38:30 +020044 - 8081:8080
45 - 50000:50000
46 environment:
47 JAVA_OPTS: "-Dhudson.footerURL=https://www.example.com"
48 volumes:
49 - /srv/volumes/jenkins:/var/jenkins_home
Michael Kutý17649402016-03-19 23:57:43 +010050
Filip Pytloun96fc0cc2016-08-29 16:01:10 +020051Compose
52~~~~~~~
53
54Install docker-compose using Pip (default is distribution package)
55
56.. code-block:: yaml
57
58 docker:
59 client:
60 compose:
61 django_web:
62 # Run up action, any positional argument to docker-compose CLI
63 # If not defined, only docker-compose.yml is generated
64 status: up
65 environment:
66 SOMEVAR: somevalue
67 service:
68 db:
69 image: postgres
70 web:
71 image: djangoapp
72 volumes:
73 - /srv/volumes/django:/srv/django
74 ports:
75 - 8000:8000
76 depends_on:
77 - db
78
79
Filip Pytlounbaf94c92016-06-07 18:07:17 +020080Registry
81--------
82
83.. code-block:: yaml
84
85 docker:
86 registry:
87 log:
88 level: debug
89 formatter: json
90 cache:
91 engine: redis
92 host: localhost
93 storage:
94 engine: filesystem
95 root: /srv/docker/registry
96 bind:
97 host: 0.0.0.0
98 port: 5000
99 hook:
100 mail:
101 levels:
102 - panic
103 # Options are rendered as yaml as is so use hook-specific options here
104 options:
105 smtp:
106 addr: smtp.sendhost.com:25
107 username: sendername
108 password: password
109 insecure: true
110 from: name@sendhost.com
111 to:
112 - name@receivehost.com
113
marco85b72a62016-07-07 13:08:33 +0200114Docker login to private registry
115--------------------------------
116
117.. code-block:: yaml
118
119 docker:
120 host:
121 enabled: true
122 registry:
123 first:
124 address: private.docker.com
125 user: username
126 password: password
127 second:
128 address: private2.docker.com
129 user: username2
130 password: password2
Michael Kutý17649402016-03-19 23:57:43 +0100131
132Read more
133---------
134
135* https://docs.docker.com/installation/ubuntulinux/
136* https://github.com/saltstack-formulas/docker-formula
Filip Pytlounbaf94c92016-06-07 18:07:17 +0200137