From c1062eef315809ceb428da02ab0af305c77d0602 Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Fri, 16 Jul 2021 19:04:43 +0800 Subject: [PATCH] build.sh: give the container a name EnglishPal. --- build.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..c7c3019 --- /dev/null +++ b/build.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +cd /home/lanhui/englishpal + +# Stop service +sudo docker stop EnglishPal + +# Rebuild container. Run this after modifying the source code. +sudo docker build -t englishpal . + +# Run the application +sudo docker run -d --name EnglishPal -p 90:80 -v /home/lanhui/englishpal/app/static/frequency:/app/static/frequency -t englishpal # for permanently saving data + +# Save space. Run it after sudo docker run +sudo docker system prune -a -f + +