-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile.debug
37 lines (25 loc) · 1.27 KB
/
Dockerfile.debug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright (c) 2019 vChain, Inc. All Rights Reserved.
# This software is released under GPL3.
# The full license information can be found under:
# https://www.gnu.org/licenses/gpl-3.0.en.html
FROM golang:1.19 as builder
WORKDIR /src
RUN apt-get install --no-install-recommends -y openssh-client
# Allow downloading vcn-enterprise using ssh agent forwarding
RUN mkdir ~/.ssh
RUN ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
ENV GOPRIVATE=github.com/codenotary/vcn-enterprise
RUN git config --global url."[email protected]:codenotary/vcn-enterprise".insteadOf "https://github.com/codenotary/vcn-enterprise"
RUN go get -u github.com/go-delve/delve/cmd/dlv
COPY . .
RUN --mount=type=ssh \
make kube-notary/debug
FROM alpine:3.15
RUN apk update && apk upgrade && apk add ca-certificates curl musl && rm -rf /var/cache/apk/*
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
RUN echo "curl -s 127.0.0.1:9581/bulk_sign" > /bin/bulk_sign \
&& chmod +x /bin/bulk_sign
COPY --from=builder /go/bin/dlv /bin/dlv
COPY --from=builder /src/kube-notary /bin/kube-notary
RUN mkdir .vcn
ENTRYPOINT ["/bin/dlv", "--listen=:40000", "--headless=true", "--continue", "--accept-multiclient", "--check-go-version=false", "--api-version=2", "exec", "/bin/kube-notary"]