forked from alexellis/derek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (21 loc) · 812 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM golang:1.9.2-alpine as build
RUN mkdir -p /go/src/github.com/alexellis/derek
WORKDIR /go/src/github.com/alexellis/derek
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o derek .
FROM alpine:3.6
RUN apk --no-cache add curl ca-certificates \
&& echo "Pulling watchdog binary from Github." \
&& curl -sSL https://github.com/alexellis/faas/releases/download/0.6.11/fwatchdog > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apk del curl --no-cache
WORKDIR /root/
COPY --from=build /go/src/github.com/alexellis/derek/derek derek
# Replace this with a Swarm secret, so that the image can be pushed remotely.
#COPY derek.pem .
ENV cgi_headers="true"
ENV validate_hmac="true"
ENV fprocess="./derek"
ENV validate_customers="true"
EXPOSE 8080
CMD ["fwatchdog"]