ci: add acceptance test

This commit is contained in:
2019-09-20 00:23:56 +02:00
parent d4e8f34b0f
commit f707ddcf23
11 changed files with 225 additions and 70 deletions

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
FROM golang:1.12-alpine as builder
# Remove the cache to avoid warning message during `apk info`
RUN rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
RUN apk update
# GO and PATH env variables already set in golang image
# to reduce download time
RUN apk --no-cache add -U make git musl-dev gcc
COPY . .
RUN GO111MODULE=on make local-build
# final stage
FROM alpine:3.7
RUN apk --no-cache add ca-certificates
WORKDIR /app
COPY --from=builder /go/bin/HamsterTycoon .
EXPOSE 8080
ENTRYPOINT ["/app/HamsterTycoon"]
CMD ["serve", "--logformat", "json", "--loglevel", "debug"]