Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- read -p "Nombre del sitio: " SITE
- echo ""
- read -p "Puerto (host): " PORT
- echo ""
- # Lanzamos contenedor
- docker run -d -v "/var/volumes/$SITE":/var/www/html --name $SITE -p $PORT:80 nginx
- docker cp ./default.conf $SITE:/etc/nginx/conf.d/default.conf
- docker exec $SITE service nginx reload
- echo "<h1>Este conetendor es para el sitio $SITE" > index.html
- sudo cp ./index.html /var/volumes/$SITE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement