forked from pactus-project/pactus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (16 loc) · 762 Bytes
/
Dockerfile
File metadata and controls
22 lines (16 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM golang:1.25.1-alpine3.22 AS builder
RUN apk add --no-cache git gmp-dev build-base g++ openssl-dev
ADD . /pactus
# Building pactus-daemon
RUN cd /pactus && \
CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-daemon ./cmd/daemon && \
CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-wallet ./cmd/wallet && \
CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-shell ./cmd/shell
## Copy binary files from builder into second container
FROM alpine:3.19
COPY --from=builder /pactus/build/pactus-daemon /usr/bin
COPY --from=builder /pactus/build/pactus-wallet /usr/bin
COPY --from=builder /pactus/build/pactus-shell /usr/bin
ENV WORKING_DIR="/pactus"
VOLUME $WORKING_DIR
WORKDIR $WORKING_DIR