Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
if docker network ls | grep nginx-proxy; then
echo 'network found'
else
echo 'network not found';
docker network create nginx-proxy
fi
if docker ps | grep nginx-proxy; then
echo 'nginx-proxy service is runnig'
else
echo 'creating service nginx-proxy';
docker run -d -p 80:80 --name nginx-proxy --net nginx-proxy -v /var/run/docker.sock:/tmp/docker.sock jwilder/nginx-proxy
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.