You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
ASYD/ASYD_Docker/docker-03/web/build.sh

15 lines
582 B

#!/bin/bash
docker run -it --rm -d -p 8080:80 --name webcp nginx
# tell user what to do :)
echo "okay, fire up browser and type 'http://$(hostname).simple.eee.intern:8080/' into address bar."
echo "you should see the nginx welcome page."
echo
read -n 1 -p "then press any key to copy our web-page to to container."
docker cp index.html web:/usr/share/nginx/html/
echo "okay, done"
echo "now reload the page in your browser. you should see our web-page."
echo
read -n 1 -p "when done, press any key to stop (and remove) the webserver container."
docker stop webcp
echo "sweet. bye"