mirror of https://github.com/rkfg/regolancer
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
748 B
Docker
39 lines
748 B
Docker
2 years ago
|
FROM golang:1.19.2-alpine as builder
|
||
|
|
||
|
|
||
|
# Pass a tag, branch or a commit using build-arg. This allows a docker
|
||
|
# image to be built from a specified Git state. The default image
|
||
|
# will use the Git tip of master by default.
|
||
|
ARG checkout="master"
|
||
|
ARG git_url="https://github.com/rkfg/regolancer.git"
|
||
|
|
||
|
|
||
|
# Install dependencies and build the binaries.
|
||
|
RUN apk add --no-cache git \
|
||
|
&& git clone $git_url /go/src/github.com/regolancer \
|
||
|
&& cd /go/src/github.com/regolancer \
|
||
|
&& git checkout $checkout \
|
||
|
&& go install
|
||
|
|
||
|
|
||
|
# Start a new, final image.
|
||
|
FROM alpine as final
|
||
|
|
||
|
|
||
|
RUN apk --no-cache add \
|
||
|
bash \
|
||
|
jq
|
||
|
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY --from=builder /go/bin/regolancer /app
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
VOLUME [ "/root/.lnd" ]
|
||
|
|
||
|
ENTRYPOINT ["./regolancer"]
|
||
|
|