Files
fn-serverless/Dockerfile
Travis Reeder f559acd7ed Renamed a bunch of images to use fnproject org. (#239)
* Renamed a bunch of images to use fnproject org.

* Multi-stage build for Docker.

* Added tmp vendor dirs to gitignore.

* Run docker-build at beginning of test.
2017-08-23 22:43:53 +03:00

14 lines
523 B
Docker

# build stage
FROM golang:alpine AS build-env
RUN apk --no-cache add build-base git bzr mercurial gcc
ENV D=/go/src/github.com/fnproject/fn
# TODO: once we get rid of the vendor dirs, add dep step using `dep ensure --vendor-only` from here: https://medium.com/travis-on-docker/triple-stage-docker-builds-with-go-and-angular-1b7d2006cb88
ADD . $D
RUN cd $D && go build -o fn-alpine && cp fn-alpine /tmp/
# final stage
FROM fnproject/dind
WORKDIR /app
COPY --from=build-env /tmp/fn-alpine /app/functions
CMD ["./functions"]