Skip to content

Commit

Permalink
chore: add Dockerfile for seda-chain
Browse files Browse the repository at this point in the history
  • Loading branch information
JeancarloBarrios committed Oct 9, 2023
1 parent db73ffb commit a3c4930
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM golang:1.21-alpine AS build-env

# Install minimum necessary dependencies
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev
RUN apk add --no-cache $PACKAGES


WORKDIR /go/src/github.com/sedaprotocol/seda-chain

# Optimized fetching of dependencies
COPY go.mod go.sum ./

RUN go mod download

# Copy and build the project
COPY . .

# Dockerfile Cross-Compilation Guide
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide
ARG TARGETOS TARGETARCH


RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build


FROM alpine:3

RUN apk add --no-cache curl make bash jq sed
COPY --from=build-env /go/src/github.com/cosmos/cosmos-sdk/build/seda-chaid /usr/bin/seda-chaind

EXPOSE 26656 26657 1317 9090

CMD ["seda-chaind", "start"]
STOPSIGNAL SIGTERM
WORKDIR /root

0 comments on commit a3c4930

Please sign in to comment.