nitro-stack/stack-orchestrator/container-build/cerc-go-nitro/Dockerfile
nabarun 034778ebeb Remove the use of L2 chain & contracts for running nitro nodes (#11)
Part of [Create bridge channel in go-nitro](https://www.notion.so/Create-bridge-channel-in-go-nitro-22ce80a0d8ae4edb80020a8f250ea270)
- Remove L2 stack setup from demo steps
- Remove steps to deploy l2 contract

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Co-authored-by: Neeraj <neeraj.rtly@gmail.com>
Reviewed-on: #11
2024-09-30 04:24:38 +00:00

30 lines
674 B
Docker

FROM golang:1.22-bullseye AS builder
# 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
# 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