-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
35 lines (24 loc) · 914 Bytes
/
Dockerfile
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
33
34
35
# First image used to build the sources
FROM golang:1.23.1 AS builder
ARG VERSION
ARG TARGETOS
ARG TARGETARCH
WORKDIR /app
COPY . .
ENV GOPROXY=https://goproxy.io,direct
RUN cd server && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-X 'main.Version=${VERSION}'" -o ../bin/arkd ./cmd/arkd
RUN cd 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/
COPY --from=builder /app/server/internal/infrastructure/db/sqlite/migration/* /app/
ENV PATH="/app:${PATH}"
ENV ARK_DATADIR=/app/data
ENV ARK_WALLET_DATADIR=/app/wallet-data
ENV ARK_DB_MIGRATION_PATH=file://
# Expose volume containing all 'arkd' data
VOLUME /app/data
VOLUME /app/wallet-data
ENTRYPOINT [ "arkd" ]