hurl/contrib/docker
2022-11-18 14:45:45 +01:00
..
Dockerfile Update Dockerfile to alpine:3.17 2022-11-18 14:45:45 +01:00
dockerhub_readme.md Update docker contrib 2021-12-16 10:20:05 +01:00
README.md Clean contrib/docker/README.md 2022-06-28 10:05:39 +02:00

Build image

hurl_latest_version=$(curl --silent "https://api.github.com/repos/Orange-OpenSource/hurl/releases/latest" | jq -r .tag_name)
docker_build_date=$(date "+%Y-%m-%d %H-%M-%S")
docker build --build-arg docker_build_date="${docker_build_date}" --build-arg hurl_latest_version=${hurl_latest_version} --tag hurl:latest --tag hurl:${hurl_latest_version} .

Get docker hurl version

docker run --rm hurl:latest --version

Run docker hurl from STDIN

echo -e "GET https://hurl.dev\n\nHTTP/1.1 200" | docker run --rm -i hurl:latest --test --color

Run docker hurl from FILE

echo -e "GET https://hurl.dev\n\nHTTP/1.1 200" > /tmp/test.hurl
docker run --rm -v /tmp/test.hurl:/tmp/test.hurl hurl:latest --test --color /tmp/test.hurl