new beginning

This commit is contained in:
Para Dox
2025-04-10 13:36:00 +07:00
parent e2f9b2f634
commit 5ce47e35dd
59 changed files with 391377 additions and 0 deletions

30
fantom/opera.Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
# Build Fantom in a stock Go builder container
FROM golang:1.19-alpine as builder
# Install packages we need
RUN apk add --no-cache make gcc musl-dev linux-headers git
# Make a folder to work in
RUN mkdir /fantom
# Grab VERSION from Build Args
ARG VERSION
ARG REPO
# Clone the repo to that folder
RUN git clone --branch ${VERSION} ${REPO:-https://github.com/Fantom-foundation/go-opera.git} /fantom
# Build Fantom
RUN cd /fantom && make
# Pull Fantom into a second stage deploy alpine container
FROM alpine:latest
RUN apk add --no-cache ca-certificates wget tzdata
COPY --from=builder /fantom/build/opera /usr/local/bin/
VOLUME /datadir
COPY ./scripts/entrypoint.opera.sh /usr/local/bin/entrypoint.sh
RUN chmod u+x /usr/local/bin/entrypoint.sh
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]

26
fantom/sonic.Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM golang:1.22 as builder
ARG VERSION
ARG REPO
RUN apt-get update && apt-get install -y git musl-dev make
RUN cd /go && git clone ${REPO:-https://github.com/Fantom-foundation/sonic.git} sonic && cd sonic && git fetch --tags && git checkout -b ${VERSION} tags/${VERSION}
WORKDIR /go/sonic
ARG GOPROXY
RUN go mod download
RUN make all
FROM golang:1.22
COPY --from=builder /go/sonic/build/sonicd /usr/local/bin/
COPY --from=builder /go/sonic/build/sonictool /usr/local/bin/
COPY ./scripts/entrypoint.sonic.sh /usr/local/bin/entrypoint.sh
VOLUME /var/sonic
RUN chmod u+x /usr/local/bin/entrypoint.sh
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]