Created
April 8, 2019 11:25
-
-
Save abhirockzz/1fc47bc748e755f8fce89325a5314849 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM fnproject/go:dev as build-stage | |
WORKDIR /function | |
RUN go get -u github.com/golang/dep/cmd/dep | |
ADD . /go/src/func/ | |
RUN cd /go/src/func/ && dep ensure | |
RUN cd /go/src/func/ && go build -o func | |
FROM fnproject/go | |
WORKDIR /function | |
COPY --from=build-stage /go/src/func/func /function/ | |
# Added OCI private key for OCI Go SDK authentication | |
ARG PRIVATE_KEY_NAME | |
COPY $PRIVATE_KEY_NAME /function/$PRIVATE_KEY_NAME | |
# OCI_PRIVATE_KEY_FILE_NAME is used as environment variable in the function code. Altered name to avoid confusion | |
ENV OCI_PRIVATE_KEY_FILE_NAME=${PRIVATE_KEY_NAME} | |
ENTRYPOINT ["./func"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment