Nabarun Gogoi
c0fe155708
* Build go-nitro container image * Run nitro node using stack * Add config setup in readme for running nitro node * Add script for deploying contracts --------- Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Co-authored-by: Neeraj <neeraj.rtly@gmail.com>
32 lines
645 B
Docker
32 lines
645 B
Docker
FROM golang:1.21-bullseye AS builder
|
|
|
|
# Copy files into image
|
|
WORKDIR /app
|
|
COPY . .
|
|
|
|
RUN go mod tidy
|
|
|
|
# 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
|
|
|
|
# Create certificates
|
|
RUN cd /app/tls && \
|
|
make create-cert
|
|
|
|
# Build the binary
|
|
RUN go build -v -o nitro .
|
|
|
|
# TODO: Update steps to build go-nitro image
|
|
# Reduce image size
|
|
FROM debian:bullseye-slim
|
|
RUN apt-get update
|
|
RUN apt-get install -y jq netcat
|
|
RUN rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/nitro .
|
|
COPY --from=builder /app/tls /app/tls
|