Files
certigo/Dockerfile
Matthew McPherrin 54580f496c Add a docker container & run tests there
This is a bit of a weird idea:  We run tests as part of the docker build.
2019-08-14 16:57:11 -07:00

22 lines
453 B
Docker

FROM golang:alpine AS builder
COPY . /src
WORKDIR /src
ENV CGO_ENABLED=0
RUN go build -mod=vendor -o /bin/certigo
RUN go vet -mod=vendor ./...
RUN go test -mod=vendor ./...
FROM python
RUN pip install cram
COPY --from=builder /bin/certigo /bin/certigo
COPY tests /tests
RUN cram -v /tests/*.t
FROM alpine
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
COPY --from=builder /bin/certigo /bin/certigo
ENTRYPOINT ["/bin/certigo"]