Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Dep tool removed from Go runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
tzununbekov committed Jul 9, 2021
1 parent f540a55 commit ea3013a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions go/runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,27 @@ spec:
ENV GIT_SSH_COMMAND "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
RUN apk --no-cache add git ca-certificates openssh \
&& go get github.com/triggermesh/aws-custom-runtime \
&& go get github.com/triggermesh/knative-lambda-runtime/go \
&& go get github.com/golang/dep/...
&& go get github.com/triggermesh/knative-lambda-runtime/go
RUN mv /go/bin/go /go/bin/bootstrap
WORKDIR /go/src/handler
COPY . .
RUN if [ -f "$HOME/.ssh/id_$(inputs.params.SSH_KEY)" ]; then \
eval "\$(ssh-agent -s)"; \
ssh-add $HOME/.ssh/id_$(inputs.params.SSH_KEY); \
fi \
&& if [ -f "Gopkg.toml" ]; then dep ensure; fi \
&& go get -v \
&& go install
&& if [ ! -f "go.mod" ]; then \
go mod init handler; \
fi \
&& go get -d -v \
&& go build -o handler
FROM alpine
WORKDIR /opt
ENV LAMBDA_TASK_ROOT "/opt"
ENV _HANDLER "handler"
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=0 /go/bin/ /opt
COPY --from=0 /go/src/handler/handler /opt
ENTRYPOINT ["/opt/aws-custom-runtime"]
EOF
- name: export
Expand Down

0 comments on commit ea3013a

Please sign in to comment.