Skip to content

Instantly share code, notes, and snippets.

@skrat
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skrat/11402859 to your computer and use it in GitHub Desktop.
Save skrat/11402859 to your computer and use it in GitHub Desktop.
tehblog.service
[Unit]
Description=Techblog - Wordpress LAMP
After=docker.service
Requires=docker.service
[Service]
ExecStart=/usr/bin/bash -c '/usr/bin/docker ps -a | grep tehblog > /dev/null && /usr/bin/docker rm -f tehblog > /dev/null; /usr/bin/docker run --name tehblog -d -p 8081:80 tutum/wordpress'
ExecStop=/usr/bin/bash -c '/usr/bin/docker stop tehblog; /usr/bin/docker rm -f tehblog'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment