2020-10-27 12:20:06 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for rehook
|
|
|
|
#
|
|
|
|
|
|
|
|
FROM golang:alpine AS build
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
ENV GOOS=linux
|
|
|
|
ENV GOARCH=amd64
|
2021-04-14 10:38:42 +02:00
|
|
|
ENV GO111MODULE=off
|
2020-10-27 12:20:06 +02:00
|
|
|
WORKDIR /go/bin
|
|
|
|
RUN apk add --no-cache git
|
|
|
|
RUN go get -d -v github.com/jstemmer/rehook
|
|
|
|
RUN go build --ldflags '-s -extldflags "-static"' -i -o rehook github.com/jstemmer/rehook
|
|
|
|
|
|
|
|
FROM alpine:3
|
|
|
|
MAINTAINER EasyPi Software Foundation
|
|
|
|
WORKDIR /opt/rehook
|
|
|
|
RUN mkdir -p bin etc log
|
|
|
|
RUN apk add --no-cache bash coreutils curl jq
|
|
|
|
COPY --from=build /go/src/github.com/jstemmer/rehook/public public
|
|
|
|
COPY --from=build /go/src/github.com/jstemmer/rehook/views views
|
|
|
|
COPY --from=build /go/bin/rehook bin
|
|
|
|
EXPOSE 9000 9001
|
|
|
|
ENTRYPOINT ["bin/rehook"]
|
|
|
|
CMD ["-db", "etc/rehook.db", "-http", ":9000", "-admin", ":9001"]
|