mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 18:01:20 +02:00
Add source after installing apk packages
Currently, changing the source code causes the docker layer cache to break the caching of package installation (make, git, etc). If we execute the source COPY command as an individual command, then rebuilds of the container will be much quicker.
This commit is contained in:
@@ -2,9 +2,6 @@ FROM golang:1.11-alpine as builder
|
||||
|
||||
MAINTAINER Olaoluwa Osuntokun <lightning.engineering>
|
||||
|
||||
# Copy in the local repository to build from.
|
||||
COPY . /go/src/github.com/lightningnetwork/lnd
|
||||
|
||||
# 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
|
||||
@@ -12,8 +9,12 @@ ENV GODEBUG netdns=cgo
|
||||
# Install dependencies and install/build lnd.
|
||||
RUN apk add --no-cache --update alpine-sdk \
|
||||
git \
|
||||
make \
|
||||
&& cd /go/src/github.com/lightningnetwork/lnd \
|
||||
make
|
||||
|
||||
# Copy in the local repository to build from.
|
||||
COPY . /go/src/github.com/lightningnetwork/lnd
|
||||
|
||||
RUN cd /go/src/github.com/lightningnetwork/lnd \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
|
Reference in New Issue
Block a user