Skip to content

Instantly share code, notes, and snippets.

@marcelrv
marcelrv / nginx.service
Created January 12, 2018 15:34 — forked from scottslowe/nginx.service
This very simple systemd unit file will launch a Docker container running the Nginx web server.
[Unit]
Description=Nginx web front-end
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=/usr/bin/docker pull nginx
ExecStart=/usr/bin/docker run --rm --name nginx -p 80:80 nginx
ExecStop=/usr/bin/docker stop nginx