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.
lntop/docker/lntop/Dockerfile

45 lines
984 B
Docker

FROM golang:1.12-alpine as builder
# install build dependencies
RUN apk add --no-cache --update git gcc musl-dev
ARG LNTOP_SRC_PATH
WORKDIR /root/_build
# we want to populate the module cache based on the go.{mod,sum} files.
COPY "$LNTOP_SRC_PATH/go.mod" .
COPY "$LNTOP_SRC_PATH/go.sum" .
# pre-cache deps
# see https://container-solutions.com/faster-builds-in-docker-with-go-1-11/
RUN go mod download
WORKDIR $GOPATH/src/github.com/edouardparis/lntop
COPY "$LNTOP_SRC_PATH" .
ENV GO111MODULE=on
RUN go install ./...
# ---------------------------------------------------------------------------------------------------------------------------
FROM golang:1.12-alpine as final
RUN apk add --no-cache \
bash fish \
ca-certificates \
tini
ENV PATH $PATH:/root
ARG LNTOP_CONF_PATH
# copy the binaries and entrypoint from the builder image.
COPY --from=builder /go/bin/lntop /bin/
WORKDIR /root
COPY "home" .
RUN mkdir ".lntop"
COPY "$LNTOP_CONF_PATH" ".lntop/"