forked from arkade-os/go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharkd.Dockerfile
More file actions
32 lines (21 loc) · 845 Bytes
/
arkd.Dockerfile
File metadata and controls
32 lines (21 loc) · 845 Bytes
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 image used to build the sources
FROM golang:1.23.1 AS builder
ARG TARGETOS
ARG TARGETARCH
WORKDIR /app
RUN git clone https://github.com/arkade-os/arkd.git
# ENV GOPROXY=https://goproxy.io,direct
RUN cd arkd/server && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X 'main.Version=${VERSION}'" -o ../../bin/arkd ./cmd/arkd
RUN cd arkd/client && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X 'main.Version=${VERSION}'" -o ../../bin/ark .
# Second image, running the arkd executable
FROM alpine:3.20
RUN apk update && apk upgrade
WORKDIR /app
COPY --from=builder /app/bin/* /app/
ENV PATH="/app:${PATH}"
ENV ARK_DATADIR=/app/data
ENV ARK_WALLET_DATADIR=/app/wallet-data
# Expose volume containing all 'arkd' data
VOLUME /app/data
VOLUME /app/wallet-data
ENTRYPOINT [ "arkd" ]