Files
fn-serverless/images/fn-test-utils/Dockerfile
Tolga Ceylan b3f7c7fc7f fn: add tester image (#609)
* 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.
2017-12-19 15:06:16 -08:00

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"]