Skip to content
Snippets Groups Projects
Commit 2e230fdd authored by Vladimír Višňovský's avatar Vladimír Višňovský
Browse files

run running container option

parent bf5b9b3c
No related branches found
No related tags found
2 merge requests!8Development,!7Remodule (v1.0 -> v1.1)
......@@ -2,6 +2,7 @@
id="latest"
application="docker"
container_name="pipeline-web"
while getopts ":pi:" opt; do
case $opt in
......@@ -26,5 +27,11 @@ done
name="localhost/magic-pipeline-web-test:${id}"
${application} run -p 5000:5000 --entrypoint '/bin/bash' -d -ti ${name} -c 'while true; do sleep 10; done'
if $application ps | grep "$container_name" > /dev/null; then
$application exec -it $container_name bash
else
$application run -p 5000:5000 --name $container_name --entrypoint '/bin/bash' -d -ti $name -c 'while true; do sleep 10; done'
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment