Skip to content

Commit

Permalink
feat: official docker image (#567)
Browse files Browse the repository at this point in the history
Signed-off-by: francois  samin <[email protected]>
  • Loading branch information
fsamin authored Aug 4, 2022
1 parent ff0f289 commit eccaf56
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
28 changes: 13 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]: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:
Expand Down

0 comments on commit eccaf56

Please sign in to comment.