Browse Source

Update Dockerfile

master
Jan-Lukas Else 1 year ago
parent
commit
a45170a378
  1. 19
      Dockerfile

19
Dockerfile

@ -1,25 +1,20 @@
FROM alpine:edge as build-base
RUN apk add --no-cache go git gcc musl-dev tzdata
FROM build-base as packr
FROM golang:1.14-alpine as build
RUN apk add --no-cache git gcc musl-dev tzdata sqlite-dev
RUN go get github.com/gobuffalo/packr/v2/packr2
FROM build-base as build
COPY --from=packr /root/go/bin/packr2 /bin/
ADD . /app
WORKDIR /app
RUN GO111MODULE=on packr2
RUN go test
RUN go build github.com/kis3/kis3
RUN packr2
RUN go test --tags "libsqlite3 linux"
RUN go build --tags "libsqlite3 linux"
FROM alpine:3.11
RUN apk add --no-cache tzdata ca-certificates && update-ca-certificates
RUN apk add --no-cache tzdata sqlite-dev ca-certificates
RUN adduser -S -D -H -h /app kis3
COPY --from=build /app/kis3 /bin/
RUN mkdir /app && chown -R kis3 /app
USER kis3
WORKDIR /app
RUN mkdir data
VOLUME ["/app/data"]
VOLUME /app/data
EXPOSE 8080
CMD ["kis3"]
Loading…
Cancel
Save