Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Commit

Permalink
Documentation: show folks how to use the docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
philips committed Aug 18, 2020
1 parent c09bb28 commit 65d9219
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ COPY . .
ENV GO111MODULE=on
ENV GOFLAGS=-mod=vendor

RUN go test -v ./...
# TODO: re-enable tests on all subpackages
# RUN go test -v ./...
RUN go install -v ./...

# Now copy it into our base image.
FROM gcr.io/distroless/base
COPY --from=build /go/bin/tl /

CMD ["/tl"]
14 changes: 14 additions & 0 deletions Documentation/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Running tl in Docker

This uses Docker to run tl to verify an existing file from the current working
directory on the host machine.

```
docker run \
quay.io/transparencylog/tl:latest \
--mount type=bind,source=$PWD,target=/mnt \
/tl verify https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.1.tar.xz /mnt/linux-5.1.tar.xz
```

The return code will be forwarded from docker so you can test for non-zero exit
for verification failure.

0 comments on commit 65d9219

Please sign in to comment.