Last active
August 29, 2015 14:25
-
-
Save thomet/4b4e4e7e47712852da85 to your computer and use it in GitHub Desktop.
Docker only with a valume
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
coreos: | |
units: | |
- name: format-ephemeral.service | |
command: start | |
content: | | |
[Unit] | |
Description=Formats the ephemeral drive | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/bin/sh -c '/usr/sbin/blkid -pi /dev/vda | grep TYPE= || /usr/sbin/mkfs.ext4 /dev/vda' | |
- name: var-lib-docker.mount | |
command: start | |
content: | | |
[Unit] | |
Description=Mount ephemeral to /var/lib/docker | |
Requires=format-ephemeral.service | |
After=format-ephemeral.service | |
Before=docker.service | |
[Mount] | |
What=/dev/vda | |
Where=/var/lib/docker | |
Type=ext4 | |
- name: docker-tcp.socket | |
command: start | |
enable: true | |
content: | | |
[Unit] | |
Description=Docker Socket for the API | |
[Socket] | |
ListenStream=2375 | |
BindIPv6Only=both | |
Service=docker.service | |
[Install] | |
WantedBy=sockets.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment