Created
August 5, 2020 13:57
-
-
Save victorusachev/5c49f8147780ab7c2ca46354baf60d41 to your computer and use it in GitHub Desktop.
My local scripts for docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# shellcheck disable=SC2046 | |
docker build -f docker/Dockerfile -t defmain/backend:latest . -t defmain/backend:$(git rev-parse --short HEAD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -it --name vega1_back vega1:latest bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
PID_FILE=${DIR}/.pid | |
if [[ -f "$PID_FILE" ]] | |
then | |
xargs -r docker rm -f < $PID_FILE > /dev/null | |
rm $PID_FILE | |
fi | |
docker run --rm -d -p 8000:8000 -e DEFMAIN_HOST=0.0.0.0 -e DEFMAIN_PORT=8000 --name defmain_back defmain:latest > $PID_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment