mirror of
https://github.com/kaspanet/kaspad.git
synced 2026-03-02 23:23:16 +00:00
* [NOD-66] Created TX generator * [NOD-66] Created transaction generator * [NOD-66] Improved TX generator against double spend. Created genaddr utility. Refactored * [NOD-66] Save chenges before branch switch * [NOD-66] Use log package instead of fmt * [NOD-66] Fixed/restored docker files * [NOD-66] Changed according to new WithLock/NoLock convention
34 lines
709 B
Docker
34 lines
709 B
Docker
# -- multistage docker build: stage #1: build stage
|
|
FROM golang:1.12-alpine AS build
|
|
|
|
RUN mkdir -p /go/src/github.com/daglabs/btcd
|
|
|
|
WORKDIR /go/src/github.com/daglabs/btcd
|
|
|
|
RUN apk add --no-cache curl git
|
|
|
|
# GO111MODULE=on forces Go to use the go-module system
|
|
# TODO: remove this once Go 1.13 is released
|
|
ENV GO111MODULE=on
|
|
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN cd cmd/txgen && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o txgen .
|
|
|
|
# --- multistage docker build: stage #2: runtime image
|
|
FROM alpine
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache tini
|
|
|
|
COPY --from=build /go/src/github.com/daglabs/btcd/cmd/txgen/txgen /app/
|
|
|
|
ENTRYPOINT ["/sbin/tini", "--"]
|
|
|
|
CMD ["/app/txgen"]
|