@@ -16,6 +16,51 @@ See the
1616blog post for more information about the motivation and implementation of stack's
1717Docker support.
1818
19+ Prerequisites
20+ -------------------------------------------------------------------------------
21+
22+ ### Supported operating systems
23+
24+ ** Linux 64-bit** : Docker use requires machine (virtual or metal) running a Linux
25+ distribution
26+ [ that Docker supports] ( https://docs.docker.com/installation/#installation ) , with
27+ a 64-bit kernel. If you do not already have one, we suggest Ubuntu 14.04
28+ ("trusty") since this is what we test with.
29+
30+ ** Mac OS X** : [ Docker for Mac] ( https://docs.docker.com/docker-for-mac/ ) is the
31+ supported way to use Docker integration on OS X (the older Docker Machine
32+ (boot2docker) approach to using Docker on OS X is not supported due to issues
33+ with host volume mounting that make Stack nearly unusable for anything but the
34+ most trivial projects).
35+
36+ Other Un* xen are not officially supported but there are ways to get them working.
37+ See [ #194 ] ( https://github.com/commercialhaskell/stack/issues/194 ) for details
38+ and workarounds.
39+
40+ ** Windows does not work at all** (see
41+ [ #2421 ] ( https://github.com/commercialhaskell/stack/issues/2421 ) ).
42+
43+ ### Docker
44+
45+ Install the latest version of Docker by following the
46+ [ instructions for your operating system] ( http://docs.docker.com/installation/ ) .
47+
48+ The Docker client should be able to connect to the Docker daemon as a non-root
49+ user. For example (from
50+ [ here] ( http://docs.docker.com/installation/ubuntulinux/#ubuntu-raring-1304-and-saucy-1310-64-bit ) ):
51+
52+ # Add the connected user "${USER}" to the docker group.
53+ # Change the user name to match your preferred user.
54+ sudo gpasswd -a ${USER} docker
55+
56+ # Restart the Docker daemon.
57+ sudo service docker restart
58+
59+ You will now need to log out and log in again for the group addition
60+ to take effect.
61+
62+ Note the above has security implications. See [ security] ( #security ) for more.
63+
1964Usage
2065-------------------------------------------------------------------------------
2166
@@ -30,7 +75,8 @@ The most basic configuration is to add this to your project's `stack.yaml`:
3075 docker:
3176 enable: true
3277
33- See [ configuration] ( #configuration ) for additional options.
78+ See [ configuration] ( #configuration ) for additional options. You can enable it on
79+ the command-line using ` stack --docker ` .
3480
3581### Use stack as normal
3682
@@ -239,43 +285,6 @@ used with Stack's Docker integration. For example, the
239285[ official Haskell image repository] ( https://hub.docker.com/_/haskell/ ) works.
240286See [ Custom images] ( #custom-images ) for more details.
241287
242- Prerequisites
243- -------------------------------------------------------------------------------
244-
245- ### Linux 64-bit
246-
247- Docker use requires machine (virtual or metal) running a Linux distribution
248- [ that Docker supports] ( https://docs.docker.com/installation/#installation ) , with
249- a 64-bit kernel. If you do not already have one, we suggest Ubuntu 14.04
250- ("trusty") since this is what we test with.
251-
252- While Docker does support non-Linux operating systems through the ` boot2docker `
253- VM, there are issues with host volume mounting that prevent stack from being
254- usable in this configuration. See
255- [ #194 ] ( https://github.com/commercialhaskell/stack/issues/194 ) for details and
256- workarounds.
257-
258- ### Docker
259-
260- Install the latest version of Docker by following the
261- [ instructions for your operating system] ( http://docs.docker.com/installation/ ) .
262-
263- The Docker client should be able to connect to the Docker daemon as a non-root
264- user. For example (from
265- [ here] ( http://docs.docker.com/installation/ubuntulinux/#ubuntu-raring-1304-and-saucy-1310-64-bit ) ):
266-
267- # Add the connected user "${USER}" to the docker group.
268- # Change the user name to match your preferred user.
269- sudo gpasswd -a ${USER} docker
270-
271- # Restart the Docker daemon.
272- sudo service docker restart
273-
274- You will now need to log out and log in again for the group addition
275- to take effect.
276-
277- Note the above has security implications. See [ security] ( #security ) for more.
278-
279288Security
280289-------------------------------------------------------------------------------
281290
0 commit comments