mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
docker: add initial Dockerfile
This commit is contained in:
parent
2c5dd62fd7
commit
1d07f418d2
2 changed files with 62 additions and 0 deletions
4
.dockerignore
Normal file
4
.dockerignore
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
app/build
|
||||
app/coverage
|
||||
app/node_modules
|
||||
shushtar-debug
|
||||
58
Dockerfile
Normal file
58
Dockerfile
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
FROM golang:1.13-alpine as builder
|
||||
|
||||
# Copy in the local repository to build from.
|
||||
COPY . /go/src/github.com/lightninglabs/shushtar
|
||||
|
||||
# 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
|
||||
|
||||
ENV NODE_VERSION=v12.17.0
|
||||
|
||||
# Install dependencies and install/build shushtar.
|
||||
RUN apk add --no-cache --update alpine-sdk \
|
||||
git \
|
||||
make \
|
||||
curl \
|
||||
bash \
|
||||
binutils \
|
||||
tar \
|
||||
&& touch ~/.bashrc \
|
||||
&& curl -sfSLO https://unofficial-builds.nodejs.org/download/release/${NODE_VERSION}/node-${NODE_VERSION}-linux-x64-musl.tar.xz \
|
||||
&& tar -xf node-${NODE_VERSION}-linux-x64-musl.tar.xz -C /usr --strip 1 \
|
||||
&& rm node-${NODE_VERSION}-linux-x64-musl.tar.xz \
|
||||
&& curl -o- -L https://yarnpkg.com/install.sh | bash \
|
||||
&& /bin/bash \
|
||||
&& . ~/.bashrc \
|
||||
&& cd /go/src/github.com/lightninglabs/shushtar \
|
||||
&& make install \
|
||||
&& go install -v -trimpath github.com/lightningnetwork/lnd/cmd/lncli \
|
||||
&& go install -v -trimpath github.com/lightninglabs/faraday/cmd/frcli \
|
||||
&& go install -v -trimpath github.com/lightninglabs/loop/cmd/loop
|
||||
|
||||
# Start a new, final image to reduce size.
|
||||
FROM alpine as final
|
||||
|
||||
# Define a root volume for data persistence.
|
||||
VOLUME /root/.lnd
|
||||
|
||||
# Expose shushtar and lnd ports (server, rpc).
|
||||
EXPOSE 8443 10009 9735
|
||||
|
||||
# Copy the binaries and entrypoint from the builder image.
|
||||
COPY --from=builder /go/bin/shushtar /bin/
|
||||
COPY --from=builder /go/bin/lncli /bin/
|
||||
COPY --from=builder /go/bin/frcli /bin/
|
||||
COPY --from=builder /go/bin/loop /bin/
|
||||
|
||||
# Add bash.
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
jq \
|
||||
ca-certificates
|
||||
|
||||
# Specify the start command and entrypoint as the shushtar daemon.
|
||||
ENTRYPOINT ["shushtar"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue