mirror of
https://github.com/lightninglabs/loop
synced 2024-11-09 19:10:47 +00:00
793fb4d90e
* Introduced docker integration * Added Dockerfile to build loopd and loop with no dependencies. * Added instructions to build and run docker image. * Fixed documentation on mapping of ~/.lnd * Would have caused problems because ~/.loop wasn't mapped * Now map entire home directory * Updated DOCKER.md example to just map ~/.lnd and ~/.loop. * Removed mapping of home directory - one of the benefits of docker is being explicit about the resources the container uses so I felt bad mapping the entire home directory when only two known folders were used.
34 lines
899 B
Docker
34 lines
899 B
Docker
FROM golang:1.12-alpine as builder
|
|
|
|
# Copy in the local repository to build from.
|
|
COPY . /go/src/github.com/lightningnetwork/loop
|
|
|
|
# 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
|
|
|
|
# Explicitly turn on the use of modules (until this becomes the default).
|
|
ENV GO111MODULE on
|
|
|
|
# Install dependencies and install/build lnd.
|
|
RUN apk add --no-cache --update alpine-sdk \
|
|
git \
|
|
make \
|
|
&& cd /go/src/github.com/lightningnetwork/loop/cmd \
|
|
&& go install ./...
|
|
|
|
# Start a new, final image to reduce size.
|
|
FROM alpine as final
|
|
|
|
# Expose lnd ports (server, rpc).
|
|
EXPOSE 8081 11010
|
|
|
|
# Copy the binaries and entrypoint from the builder image.
|
|
COPY --from=builder /go/bin/loopd /bin/
|
|
COPY --from=builder /go/bin/loop /bin/
|
|
|
|
# Add bash.
|
|
RUN apk add --no-cache \
|
|
bash \
|
|
ca-certificates
|