mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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.
This commit is contained in:
committed by
Denis Makogon
parent
f90879b751
commit
f559acd7ed
14
Dockerfile
14
Dockerfile
@@ -1,7 +1,13 @@
|
||||
FROM funcy/dind
|
||||
# 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
|
||||
|
||||
ADD functions-alpine /app/functions
|
||||
|
||||
COPY --from=build-env /tmp/fn-alpine /app/functions
|
||||
CMD ["./functions"]
|
||||
|
||||
Reference in New Issue
Block a user