Files
fn-serverless/Dockerfile
Jan Sauer fd27c407b2 Add fnserver port to docker image (#1507)
Docker images have the notion of exposed ports. This indicates the
ports on which a container listens for connections. For the current
fnserver image this is the port 2375 with it inherits from the
fnproject/dind base image.
This confuses end users and other software (reverse proxies) that
expect the fnserver api at this port when inspecting the image/container.

For now it is not possible to remove/unset ports exposed by a base
image but this mr at least adds the default fnserver port to the list
of exposed ports.

https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#expose
2019-06-17 13:32:32 -04:00

16 lines
515 B
Docker

# build stage
FROM golang:1.10-alpine AS build-env
RUN apk --no-cache add build-base git bzr mercurial gcc
ENV D=/go/src/github.com/fnproject/fn
ADD . $D
RUN cd $D/cmd/fnserver && go build -o fn-alpine && cp fn-alpine /tmp/
# final stage: the local fnproject/dind:latest will be either built afresh or
# whatever is the latest from master, depending on whether we're releasing
# a newer cut.
FROM fnproject/dind:latest
WORKDIR /app
COPY --from=build-env /tmp/fn-alpine /app/fnserver
CMD ["./fnserver"]
EXPOSE 8080