#!/bin/bash -ie

USER_ID=$(id -u)
DOCKER_NAME="pocs-shell"

INDEX_DIR=${INDEX_DIR:-${PANDIR}/astrometry/data}
ASTROMETRY_URL=${ASTROMETRY_URL:-http://broiler.astrometry.net/~dstn/4200}

if [ ! "$(docker ps -q -f name=${DOCKER_NAME})" ]; then
    echo "${DOCKER_NAME} not running. Start services with scripts/pocs-docker.sh"
else
    docker exec --user "${USER_ID}" -it pocs-shell /bin/zsh -ic "python ${POCS}/scripts/${DOCKER_NAME}.py"
fi

