Skip to content

Commit

Permalink
Update docker daemon configuration file
Browse files Browse the repository at this point in the history
 * According to the official docs files in /usr/lib/systemd/system or
   /lib/systemd/system contain the defaults and should not be modified
 * The recommended method to configure the daemon is to place files in
   /etc/systemd/system/docker.service.d
 * https://docs.docker.com/engine/admin/systemd/
  • Loading branch information
briandbecker committed Apr 29, 2016
1 parent f26b1ef commit e78ec48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@
when: docker_opts != "" and ansible_distribution_version|version_compare(15.04, '>=')

- name: Ensure docker daemon options used (systemd)
lineinfile:
dest: /lib/systemd/system/docker.service
regexp: "ExecStart=/usr/bin/docker daemon -H fd://"
line: ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS
template:
src: docker.conf
dest: /etc/systemd/system/docker.service.d/docker.conf
notify:
- Reload systemd
- Restart docker
Expand Down
3 changes: 3 additions & 0 deletions templates/docker.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS

0 comments on commit e78ec48

Please sign in to comment.