mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* fn: add fn-test-utils image New tester image that uses go-fdk for advanced test scenarios. Right now, this is an enhanced 'hello/sleeper' rolled into one that echos the received headers/env to allow writing test cases.
17 lines
465 B
Docker
17 lines
465 B
Docker
|
|
# build stage
|
|
FROM golang:1.9-alpine AS build-env
|
|
RUN apk --no-cache add build-base git bzr mercurial gcc
|
|
ENV D=/go/src/github.com/fnproject/fn/images/fn-test-utils
|
|
RUN go get -u github.com/golang/dep/cmd/dep
|
|
ADD Gopkg.* $D/
|
|
RUN cd $D && dep ensure --vendor-only
|
|
ADD . $D
|
|
RUN cd $D && go build -o fn-test-utils && cp fn-test-utils /tmp/
|
|
|
|
# final stage
|
|
FROM alpine
|
|
WORKDIR /function
|
|
COPY --from=build-env /tmp/fn-test-utils /function
|
|
ENTRYPOINT ["./fn-test-utils"]
|