-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
36 lines (26 loc) · 1.2 KB
/
Dockerfile
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
# 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"
COPY . .
RUN --mount=type=ssh \
make kube-notary
RUN wget https://vcn-releases.s3.eu-west-1.amazonaws.com/vcn-latest-linux-amd64-static -O vcn
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 printf '#!/bin/sh\ncurl -s 127.0.0.1:9581/bulk_sign\n' > /bin/bulk_sign \
&& chmod +x /bin/bulk_sign
COPY --from=builder /src/kube-notary /bin/kube-notary
COPY --from=builder /src/vcn /bin/vcn
RUN chmod +x /bin/vcn
RUN mkdir .vcn
ENTRYPOINT [ "/bin/kube-notary" ]