Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 40 lines (39 sloc) 656 Bytes
#! /bin/sh
case $* in
build)
docker build -t nginx .
;;
create)
docker create --name nginx -p 80:80 -p 443:443 -v /home/labfolder/nginx/etc_nginx:/etc/nginx:ro nginx
;;
start)
docker start nginx
;;
stop)
docker stop nginx
;;
rm)
docker rm nginx
;;
rmi)
docker rmi nginx
;;
restart)
docker stop nginx
docker start nginx
;;
show)
echo
docker ps -a | grep nginx
echo
docker images | grep nginx
echo
;;
logs)
docker logs nginx
;;
*)
echo "usage: $0 { build | create | start | stop | rm | restart | show | logs }"
exit 1
;;
esac