From eccaf56352726ea08d039b2bfd5fef6ec406c33b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Samin?= Date: Thu, 4 Aug 2022 17:12:40 +0200 Subject: [PATCH] feat: official docker image (#567) Signed-off-by: francois samin --- Dockerfile | 28 +++++++++++++--------------- README.md | 11 +++++++---- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6ca07286..1d4459d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,18 @@ -FROM debian:buster-slim +FROM alpine:3.16 +RUN apk update && \ + apk --no-cache add tzdata && \ + apk --no-cache add ca-certificates && rm -rf /var/cache/apk/* -RUN apt-get update && \ - apt-get install -y curl unixodbc && \ - rm -rf /var/lib/apt/lists/* +COPY dist/venom.linux-amd64 /usr/local/venom -RUN LAST_RELEASE=$(curl -s https://api.github.com/repos/ovh/venom/releases | grep tag_name | head -n 1 | cut -d '"' -f 4) && \ - todl=$(curl -s https://api.github.com/repos/ovh/venom/releases | grep ${LAST_RELEASE} | grep browser_download_url | grep -E 'venom.linux-amd64' | cut -d '"' -f 4) && \ - curl -s $todl -L -o /opt/venom && \ - chmod +x /opt/venom +VOLUME /workdir/results +VOLUME /workdir/tests +WORKDIR /workdir -VOLUME /outputs +ENTRYPOINT ["/usr/local/venom"] -#Default volume for tests suite -VOLUME /testsuite -WORKDIR /testsuite +ENV VENOM_OUTPUT_DIR=/workdir/results +ENV VENOM_LIB_DIR=/workdir/tests/lib +ENV VENOM_VERBOSE=1 -ENTRYPOINT ["/opt/venom" ] - -CMD [ "run", "--output-dir", "/outputs"] +CMD [ "run", "./tests/*.y*ml"] \ No newline at end of file diff --git a/README.md b/README.md index 13a0d49c..77e28686 100644 --- a/README.md +++ b/README.md @@ -97,14 +97,17 @@ Version venom: v1.0.1 # Docker image -Instead of installing (and updating) Venom locally, Venom can be started as a Docker image with following commands: +Instead of installing (and updating) Venom locally, Venom can be started as a Docker image with following commands. + +Considering your testsuites are in `./tests` directory in your current directory and your test library is under `./tests/lib`, the results will be available under the `results` directory. ```bash -$ git clone git@github.com:ovh/venom.git -$ cd venom -$ docker run -it $(docker build -q .) --rm -v $(pwd)/outputs:/outputs -v $(pwd):/tests run /tests/testsuite.yaml +$ mkdir -p results +$ docker run --mount type=bind,source=$(pwd)/tests,target=/workdir/tests --mount type=bind,source=$(pwd)/results,target=/workdir/results ovhcom/venom:latest ``` +Please refer to https://hub.docker.com/r/ovhcom/venom/tags to get the available image tags. + # CLI Usage `venom` CLI is composed of several commands: