#! /bin/bash

set -e
set -u

cd "$(dirname "${BASH_SOURCE[0]}")"
dir="$(pwd)"

#if [ ! -e $dir/mnt/proxy ]; then
#   pushd $GOPATH/src/local/rproxy3
#   CGO_ENABLED=0 GOOS=linux go build -o "$dir/mnt/proxy" -a -installsuffix cgo
#   popd
#fi

docker build -t dev:dev .
docker run --rm -it \
   --name cytube \
   -v $PWD/mnt:/mnt \
   -v $HOME/Movies:/movies:ro \
   -p 8080:8080 \
   -p 8443:8443 \
   -p 1337:1337 \
   dev:dev
