mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-09 22:18:00 -05:00
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com> Co-authored-by: noelwei <fan@scroll.io> Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com> Co-authored-by: Rohit Narurkar <rohit.narurkar@proton.me> Co-authored-by: colinlyguo <colinlyguo@scroll.io> Co-authored-by: Péter Garamvölgyi <peter@scroll.io> Co-authored-by: Morty <70688412+yiweichi@users.noreply.github.com> Co-authored-by: omerfirmak <omerfirmak@users.noreply.github.com> Co-authored-by: jonastheis <jonastheis@users.noreply.github.com> Co-authored-by: georgehao <georgehao@users.noreply.github.com>
30 lines
903 B
Docker
30 lines
903 B
Docker
# Download Go dependencies
|
|
FROM scrolltech/go-rust-builder:go-1.22-rust-nightly-2023-12-03 as base
|
|
|
|
WORKDIR /src
|
|
COPY go.work* ./
|
|
COPY ./rollup/go.* ./rollup/
|
|
COPY ./common/go.* ./common/
|
|
COPY ./coordinator/go.* ./coordinator/
|
|
COPY ./database/go.* ./database/
|
|
COPY ./tests/integration-test/go.* ./tests/integration-test/
|
|
COPY ./bridge-history-api/go.* ./bridge-history-api/
|
|
RUN go mod download -x
|
|
|
|
# Build rollup_relayer
|
|
FROM base as builder
|
|
|
|
RUN --mount=target=. \
|
|
--mount=type=cache,target=/root/.cache/go-build \
|
|
cd /src/rollup/cmd/rollup_relayer/ && CGO_LDFLAGS="-ldl" go build -v -p 4 -o /bin/rollup_relayer
|
|
|
|
# Pull rollup_relayer into a second stage deploy ubuntu container
|
|
FROM ubuntu:20.04
|
|
|
|
RUN apt update && apt install vim netcat-openbsd net-tools curl ca-certificates -y
|
|
|
|
ENV CGO_LDFLAGS="-ldl"
|
|
|
|
COPY --from=builder /bin/rollup_relayer /bin/
|
|
WORKDIR /app
|
|
ENTRYPOINT ["rollup_relayer"] |