Remove go-nitro repo dependency from nitro-node and bridge stacks #12

Merged
nabarun merged 6 commits from ag-use-binary into main 2024-10-17 07:46:15 +00:00
5 changed files with 16 additions and 25 deletions
Showing only changes of commit 61695df4c3 - Show all commits

View File

@ -43,4 +43,4 @@ EOF
# Start bridge
echo "Starting nitro-bridge"
./nitro-bridge -config $bridge_config_file
./bridge -config $bridge_config_file

View File

@ -1,29 +1,21 @@
FROM golang:1.22-bullseye AS builder
FROM debian:bullseye-slim
RUN apt-get update
RUN apt-get install -y jq netcat ca-certificates curl
RUN rm -rf /var/lib/apt/lists/*
# Copy files into image
WORKDIR /app
COPY . .
# Install mkcert
RUN curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
RUN chmod +x mkcert-v*-linux-amd64
RUN cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
RUN go mod tidy
# Download binaries
RUN curl -LO https://3a54-14-140-185-65.ngrok-free.app/cerc-io/nitro/releases/download/latest/nitro
RUN curl -LO https://3a54-14-140-185-65.ngrok-free.app/cerc-io/nitro/releases/download/latest/bridge
# Build the binary
RUN go build -v -o nitro .
RUN go build -o nitro-bridge cmd/start-bridge/main.go
# Reduce image size
FROM debian:bullseye-slim
RUN apt-get update
RUN apt-get install -y jq netcat ca-certificates
RUN rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/nitro .
COPY --from=builder /app/nitro-bridge .
COPY --from=builder /usr/local/bin/mkcert /usr/local/bin/mkcert
# Make binaries executable
RUN chmod +x ./nitro
RUN chmod +x ./bridge

View File

@ -4,10 +4,7 @@ RUN apk --update --no-cache add python3 alpine-sdk bash curl jq
WORKDIR /app
COPY . .
RUN echo "Installing dependencies" && \
yarn && yarn build
RUN npm config set @cerc-io:registry https://3a54-14-140-185-65.ngrok-free.app/api/packages/cerc-io/npm/
RUN echo "Installing nitro-rpc-client" && \
npm install -g ./packages/nitro-rpc-client
npm install -g @cerc-io/nitro-rpc-client

View File

@ -3,6 +3,7 @@ name: bridge
description: "Nitro bridge with contracts deployment and nitro-rpc-client"
repos:
containers:
- cerc/go-nitro
- cerc/nitro-client
pods:
- nitro-bridge

View File

@ -3,6 +3,7 @@ name: nitro-node
description: "Nitro node with nitro-rpc-client"
repos:
containers:
- cerc/go-nitro
- cerc/nitro-client
pods:
- nitro-node