We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 131e668 commit 5ce7b0bCopy full SHA for 5ce7b0b
docker_auto_start.sh
@@ -22,9 +22,9 @@ stop_and_remove() {
22
echo "Stopping the current container for $image_tag"
23
CURRENT_CONTAINER=$(docker ps -q -f ancestor=$image_tag)
24
if [ -n "$CURRENT_CONTAINER" ]; then
25
- docker stop $CURRENT_CONTAINER
+ docker stop $CURRENT_CONTAINER -f
26
echo "Removing the current container for $CURRENT_CONTAINER"
27
- docker rm $CURRENT_CONTAINER
+ docker rm $CURRENT_CONTAINER -f
28
else
29
echo "No running container found for $REPO."
30
fi
@@ -50,7 +50,7 @@ pull_and_start() {
50
}
51
52
# Main function to handle command-line arguments
53
-function main() {
+main() {
54
case "$1" in
55
stop)
56
stop_and_remove
0 commit comments