You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

17 lines
351 B
Bash

#!/bin/bash
# Stop and remove the container if it is running
if [ $(docker ps | grep "nginx" | wc -l) -gt 0 ]
then
docker stop nginx-example
docker rm nginx-example
fi
# Run the container with the script/command of your choice
# docker run ...
# OR docker-compose ...
docker run -d --rm --name "nginx-example" local/nginx-example:latest