-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (20 loc) · 739 Bytes
/
Dockerfile
File metadata and controls
28 lines (20 loc) · 739 Bytes
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
# syntax = docker/dockerfile:1.3
# Copyright 2020 ChainSafe Systems
# SPDX-License-Identifier: LGPL-3.0-only
FROM golang:1.21-bookworm AS builder
ADD . /src
WORKDIR /src
ENV GOPRIVATE="github.com/dentnet/*"
# Download public key for github.com
RUN --mount=type=ssh mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
RUN git config --global url."[email protected]:".insteadOf "https://github.com/"
RUN --mount=type=ssh go mod download
RUN cd cmd/chainbridge && go build -o /bridge .
# # final stage
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates
RUN update-ca-certificates
COPY --from=builder /bridge ./
RUN chmod +x ./bridge
ENTRYPOINT ["./bridge"]