Keep It Simple Stupid Stats (KISSS)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
511 B

2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
  1. FROM golang:1.14-alpine as build
  2. RUN apk add --no-cache git gcc musl-dev tzdata sqlite-dev
  3. RUN go get github.com/gobuffalo/packr/v2/packr2
  4. ADD . /app
  5. WORKDIR /app
  6. RUN packr2
  7. RUN go test --tags "libsqlite3 linux"
  8. RUN go build --tags "libsqlite3 linux"
  9. FROM alpine:3.11
  10. RUN apk add --no-cache tzdata sqlite-dev ca-certificates
  11. RUN adduser -S -D -H -h /app kis3
  12. COPY --from=build /app/kis3 /bin/
  13. RUN mkdir /app && chown -R kis3 /app
  14. USER kis3
  15. WORKDIR /app
  16. RUN mkdir data
  17. VOLUME /app/data
  18. EXPOSE 8080
  19. CMD ["kis3"]