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>
This commit is contained in:
2024-07-10 14:36:09 +00:00
committed by ashwin
co-authored by nabarun
parent 576569fe66
commit 9dc84ef943
3 changed files with 10 additions and 11 deletions
+9 -9
View File
@@ -1,7 +1,4 @@
FROM golang:alpine AS build-env
# Install dependencies
RUN apk add --update git build-base linux-headers
FROM golang:1.21-bullseye AS builder
# Set working directory for the build
WORKDIR /go/src/git.vdb.to/cerc-io/laconicd
@@ -17,13 +14,16 @@ COPY . .
RUN make build
# Final image
FROM alpine:3.17.0
FROM ubuntu:22.04
# Install ca-certificates
RUN apk add --update ca-certificates jq curl bash
# 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 binaries from the build-env
COPY --from=build-env /go/src/git.vdb.to/cerc-io/laconicd/build/laconicd /usr/bin/laconicd
# Copy over binary from the builder
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/build/laconicd /usr/bin/laconicd
WORKDIR /