Skip to content

Instantly share code, notes, and snippets.

@victorusachev
Created August 5, 2020 13:57
Show Gist options
  • Save victorusachev/5c49f8147780ab7c2ca46354baf60d41 to your computer and use it in GitHub Desktop.
Save victorusachev/5c49f8147780ab7c2ca46354baf60d41 to your computer and use it in GitHub Desktop.
My local scripts for docker
# shellcheck disable=SC2046
docker build -f docker/Dockerfile -t defmain/backend:latest . -t defmain/backend:$(git rev-parse --short HEAD)
docker run --rm -it --name vega1_back vega1:latest bash
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