-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdev.Dockerfile
More file actions
29 lines (22 loc) · 878 Bytes
/
dev.Dockerfile
File metadata and controls
29 lines (22 loc) · 878 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
ARG GO_VERSION=1.25.9
ARG BASE_IMAGE=lightninglabs/lnd
ARG BASE_IMAGE_VERSION=v0.21.0-beta.rc1
FROM golang:${GO_VERSION}-alpine as builder
# Allow defining the CGO_ENABLED variable so we can build binaries
# that will work in a different type of container.
ARG CGO_ENABLED=1
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
# queries required to connect to linked containers succeed.
ENV GODEBUG netdns=cgo
# Copy in the local repository to build from.
COPY . /go/src/github.com/lightninglabs/lndinit
# Install dependencies and build the binaries.
RUN apk add --no-cache --update alpine-sdk \
git \
make \
&& cd /go/src/github.com/lightninglabs/lndinit \
&& make install
# Start a new, final image.
FROM ${BASE_IMAGE}:${BASE_IMAGE_VERSION} as final
# Copy the binary from the builder image.
COPY --from=builder /go/bin/lndinit /bin/