hurl/contrib/docker
2023-06-02 08:41:12 +02:00
..
Dockerfile Improve Dockerfile contrib using bin/*sh 2023-06-01 17:16:07 +02:00
dockerhub_readme.md Update docker contrib doc 2023-01-26 10:34:36 +01:00
README.md Fix docker contrib 2023-06-02 08:41:12 +02:00

Connect to github container registry

echo <hurl-bot github token> | docker login ghcr.io --username hurl-bot --password-stdin

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 builder prune --all
docker build --build-arg docker_build_date="${docker_build_date}" --build-arg hurl_latest_version=${hurl_latest_version} --tag ghcr.io/orange-opensource/hurl:latest --tag ghcr.io/orange-opensource/hurl:${hurl_latest_version} .

Get docker hurl version

docker run --rm ghcr.io/orange-opensource/hurl:latest --version

Run docker hurl from STDIN

echo -e "GET https://hurl.dev\n\nHTTP 200" | docker run --rm ghcr.io/orange-opensource/hurl:latest --test --color

Run docker hurl from FILE

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

Push to github container registry

docker push ghcr.io/orange-opensource/hurl:${hurl_latest_version}
docker push ghcr.io/orange-opensource/hurl:latest