laconicd/Dockerfile
Prathamesh Musale 9dc84ef943 Replace alpine with ubuntu as base image in the Dockerfile (#31)
Part of [Create a public laconicd testnet](https://www.notion.so/Create-a-public-laconicd-testnet-896a11bdd8094eff8f1b49c0be0ca3b8)

Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Reviewed-on: cerc-io/laconic2d#31
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-07-10 14:36:09 +00:00

32 lines
682 B
Docker

FROM golang:1.21-bullseye AS builder
# Set working directory for the build
WORKDIR /go/src/git.vdb.to/cerc-io/laconicd
# Cache Go modules
COPY go.mod go.sum ./
RUN go mod download
# Add source files
COPY . .
# Make the binary
RUN make build
# Final image
FROM ubuntu:22.04
# Install ca-certificates, jq, curl, bash, and other necessary packages
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
jq curl netcat bash \
&& rm -rf /var/lib/apt/lists/*
# Copy over binary from the builder
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/build/laconicd /usr/bin/laconicd
WORKDIR /
# Run laconicd by default
CMD ["laconicd"]