Changes

Docker

723 bytes added, 21:37, 24 June 2018
docker-compose.yml syntax
* '''build''': In version 1 file format, build is different in two ways:** Only the string form (build: .) is allowed - not the object form that is allowed in Version 2 and up.** Using build together with image is not allowed. Attempting to do so results in an error.  * '''dockerfile''': Dockerfile-alternate  * '''command''': Override the default command.
<pre>
command: ["bundle", "exec", "thin", "-p", "3000"]
- 9.9.9.9
</pre>
 
 
dns_search
Custom DNS search domains. Can be a single value or a list.
 
dns_search: example.com
dns_search:
- dc1.example.com
- dc2.example.com
 
 
'''entrypoint''': Override the default entrypoint.
<pre>
entrypoint: /code/entrypoint.sh
or as a list:
entrypoint:
- php
- -d
</pre>
Note: Setting entrypoint both overrides any default entrypoint set on the service’s image with the ENTRYPOINT Dockerfile instruction, and clears out any default command on the image - meaning that if there’s a CMD instruction in the Dockerfile, it is ignored.
 
 
'''env_file''': Add environment variables from a file. Can be a single value or a list.
<pre>
env_file:
- ./common.env
- ./apps/web.env
</pre>
 
 
<br>
<br>
==Good to know==