diff --git a/run.sh b/run.sh index 5a04a50..e682f3c 100755 --- a/run.sh +++ b/run.sh @@ -6,14 +6,20 @@ CONTAINER_BASE_DIR=/tmp/test CONTAINER_ENGINE=${CONTAINER_ENGINE:-'docker'} IMG=${IMG:-'quay.io/rogreen/bookmark-generator:latest'} OUTPUT_HTML_FILE=${OUTPUT_FILE:-'bookmark.html'} +ADDITIONAL_CONTAINER_ENGINE_ARGS=${ADDITIONAL_CONTAINER_ENGINE_ARGS:-} + +if [[ "${CONTAINER_ENGINE}" == 'podman' ]]; then + ADDITIONAL_CONTAINER_ENGINE_ARGS="${ADDITIONAL_CONTAINER_ENGINE_ARGS} --net=host" +fi ${CONTAINER_ENGINE} run \ --rm \ --interactive \ --tty \ --volume \ - $(pwd):${CONTAINER_BASE_DIR}/data \ - ${IMG} \ + "$(pwd)":${CONTAINER_BASE_DIR}/data \ + "${ADDITIONAL_CONTAINER_ENGINE_ARGS}" \ + "${IMG}" \ python3 \ bookmark_generator.py \ - data/sample.yaml > ${OUTPUT_HTML_FILE} + data/sample.yaml > "${OUTPUT_HTML_FILE}"