This repository was archived by the owner on Dec 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -46,25 +46,27 @@ spec:
46
46
ENV GIT_SSH_COMMAND "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
47
47
RUN apk --no-cache add git ca-certificates openssh \
48
48
&& go get github.com/triggermesh/aws-custom-runtime \
49
- && go get github.com/triggermesh/knative-lambda-runtime/go \
50
- && go get github.com/golang/dep/...
49
+ && go get github.com/triggermesh/knative-lambda-runtime/go
51
50
RUN mv /go/bin/go /go/bin/bootstrap
52
51
WORKDIR /go/src/handler
53
52
COPY . .
54
53
RUN if [ -f "$HOME/.ssh/id_$(inputs.params.SSH_KEY)" ]; then \
55
54
eval "\$(ssh-agent -s)"; \
56
55
ssh-add $HOME/.ssh/id_$(inputs.params.SSH_KEY); \
57
56
fi \
58
- && if [ -f "Gopkg.toml" ]; then dep ensure; fi \
59
- && go get -v \
60
- && go install
57
+ && if [ ! -f "go.mod" ]; then \
58
+ go mod init handler; \
59
+ fi \
60
+ && go get -d -v \
61
+ && go build -o handler
61
62
62
63
FROM alpine
63
64
WORKDIR /opt
64
65
ENV LAMBDA_TASK_ROOT "/opt"
65
66
ENV _HANDLER "handler"
66
67
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
67
68
COPY --from=0 /go/bin/ /opt
69
+ COPY --from=0 /go/src/handler/handler /opt
68
70
ENTRYPOINT ["/opt/aws-custom-runtime"]
69
71
EOF
70
72
- name : export
You can’t perform that action at this time.
0 commit comments