mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 04:04:21 +01:00
* tx history * fix * fix * pr review refactor * pr review refactor * fix * pr review refactor * exclude gosec G115 Integer Overflow Conversion * ignore some gosec errs * ignore some gosec errs * ignore createdat in test assertion * Fixes (#7) * Fixes * Fixes * Update golang (#8) * update gha golangci-lint version * update gha golangci-lint version * fix linting issues * fix linting issues * fix linting issues * add linter timeout --------- Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
36 lines
914 B
Docker
36 lines
914 B
Docker
# 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" ]
|