Created
October 24, 2017 09:59
-
-
Save mlabouardy/4cb5c53833899c0e67910bd2151cd612 to your computer and use it in GitHub Desktop.
Build Serverless Go app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.9.1 AS builder | |
MAINTAINER mlabouardy <[email protected]> | |
WORKDIR /go/src/github.com/mlabouardy/Memes9Gag | |
RUN go get -d -v github.com/mlabouardy/9gag | |
COPY handler.go . | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . | |
FROM alpine:latest | |
RUN apk --no-cache add ca-certificates | |
ADD https://github.com/openfaas/faas/releases/download/0.5.1-alpha/fwatchdog /usr/bin | |
RUN chmod +x /usr/bin/fwatchdog | |
WORKDIR /root/ | |
COPY --from=builder /go/src/github.com/mlabouardy/Memes9Gag/app . | |
ENV fprocess="/root/app" | |
CMD ["fwatchdog"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment