Skip to content

Instantly share code, notes, and snippets.

@iganari
Last active July 11, 2019 14:33
Show Gist options
  • Save iganari/d5495a207dc928f8fc554aa38512e189 to your computer and use it in GitHub Desktop.
Save iganari/d5495a207dc928f8fc554aa38512e189 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -xeu
_I_TAG='project-name'
BASEPATH=$(cd `dirname $0`; pwd)
DIREPATH=`echo $BASEPATH | awk -F\/ '{print $NF}'`
set +eu
docker rm -f ${_I_TAG}
set -eu
docker build . -t ${_I_TAG}
docker run --rm \
-it \
-v $BASEPATH:/opt/hejda/$DIREPATH \
-w /opt/hejda/$DIREPATH \
-h ${_I_TAG} \
--name ${_I_TAG} \
${_I_TAG} \
/bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment