Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Instalar docker
- #
- apt update && apt install docker.io -y
- # Añadir usario a grupo docker
- #
- #
- gpasswd -a $USER docker
- # Crear red
- docker network create nginx-proxy
- # Desplegar nginx
- #
- docker run -d -p 80:80 \
- --restart=always \
- --name nginx-proxy \
- -v /var/run/docker.sock:/tmp/docker.sock:ro \
- --network nginx-proxy \
- jwilder/nginx-proxy
- # apache2 test
- #
- docker run -d \
- --restart=always \
- --name apache2-proxy \
- --network nginx-proxy \
- -e VIRTUAL_HOST=nginx-proxy.test \
- ubuntu/apache2
- # final
- #
- echo "
- acceso http://nginx-proxy.test
- "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement