Last active
August 29, 2015 14:10
-
-
Save cezarsa/0846ba2a8b229cd01833 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
cat<<-EOF > /etc/systemd/system/docker.service | |
[Unit] | |
Description=Docker Application Container Engine | |
Documentation=http://docs.docker.io | |
Requires=docker.socket | |
[Service] | |
Environment="TMPDIR=/var/tmp/" | |
ExecStartPre=/bin/mount --make-rprivate / | |
LimitNOFILE=1048576 | |
LimitNPROC=1048576 | |
# Run docker but don't have docker automatically restart | |
# containers. This is a job for systemd and unit files. | |
ExecStart=/usr/bin/docker --daemon --storage-driver=btrfs --host=fd:// --host=0.0.0.0:4243 | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
systemctl stop docker | |
systemctl disable docker | |
systemctl enable /etc/systemd/system/docker.service | |
systemctl start docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment