2021-03-18 02:05:05 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# A convenience command to run the built docker container with a local config file and local output directory.
|
|
|
|
# Note: this works by mounting the current working directory as a Docker volume.
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
2021-06-24 13:16:49 -07:00
|
|
|
DOCKER_IMAGE=linkedin/datahub-ingestion:${DATAHUB_VERSION:-head}
|
2021-03-18 02:05:05 -04:00
|
|
|
|
2021-06-24 13:16:49 -07:00
|
|
|
echo "+ Pulling $DOCKER_IMAGE"
|
|
|
|
docker pull $DOCKER_IMAGE
|
2021-03-18 02:05:05 -04:00
|
|
|
|
2021-06-24 13:16:49 -07:00
|
|
|
echo '+ Running ingestion'
|
2021-03-18 02:05:05 -04:00
|
|
|
docker run --rm \
|
|
|
|
--network host \
|
|
|
|
--workdir=/dir \
|
|
|
|
--mount type=bind,source="$(pwd)",target=/dir \
|
|
|
|
$DOCKER_IMAGE \
|
|
|
|
$@
|