Created
July 11, 2014 14:49
-
-
Save skyend/cfc26761ebb3a357cbe9 to your computer and use it in GitHub Desktop.
docker service script for systemd
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
[Unit] | |
Description=Docker Mongodb image | |
After=mongo.service | |
[Service] | |
ExecStart=/bin/bash -c '/usr/bin/docker run -v /data/mongo:/data/mongo --name mongo -p 27017:27017 oym:mongo' | |
ExecStop=/bin/bash -c '/usr/bin/docker stop mongo && /usr/bin/docker rm mongo' | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment