aboutsummaryrefslogtreecommitdiffstats
path: root/wallet.Dockerfile
blob: 8c1d48fdfb7b50c668c7fca9dd8b5c9ba4d138df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# First stage: build the ark-wallet-daemon binary
FROM golang:1.25.6 AS builder

ARG VERSION
ARG TARGETOS
ARG TARGETARCH

ARG BRANCH=master

WORKDIR /app

RUN git clone https://github.com/arkade-os/arkd.git && cd arkd && git checkout ${BRANCH}

RUN mkdir -p bin && cd arkd && \
    CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
    go build -ldflags="-X 'main.Version=${VERSION}'" -o /app/bin/arkd-wallet ./cmd/arkd-wallet/main.go

# Second stage: minimal runtime image
FROM alpine:3.22

RUN apk update && apk upgrade

WORKDIR /app

COPY --from=builder /app/bin/arkd-wallet /app/

ENV PATH="/app:${PATH}"
ENV ARK_WALLET_DATADIR=/app/wallet-data

VOLUME /app/wallet-data

ENTRYPOINT [ "arkd-wallet" ]