Make webhookstash a static binary

This commit is contained in:
Alex Ellis
2017-04-13 22:58:32 +01:00
parent 2575ef407d
commit ee95e272cc
6 changed files with 32 additions and 15 deletions

View File

@ -1,15 +1,16 @@
FROM golang:1.7.5
RUN mkdir -p /go/src/app
COPY handler.go /go/src/app
WORKDIR /go/src/app
RUN go get -d -v
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
FROM alpine:latest
WORKDIR /root/
ADD https://github.com/alexellis/faas/releases/download/0.5.1-alpha/fwatchdog /usr/bin
EXPOSE 8080
ENV http_proxy ""
ENV https_proxy ""
ADD https://github.com/alexellis/faas/releases/download/v0.5-alpha/fwatchdog /usr/bin
RUN chmod +x /usr/bin/fwatchdog
# COPY fwatchdog /usr/bin/
ENV fprocess="/go/src/app/app"
COPY app .
ENV fprocess="/root/app"
CMD ["fwatchdog"]