- rename git hash to repo_GIT_HASH - add arg for repo as well to provide customization Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
42 lines
957 B
Docker
42 lines
957 B
Docker
# build txoo
|
|
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as builder
|
|
|
|
WORKDIR /build
|
|
|
|
RUN apk update && \
|
|
apk add \
|
|
git \
|
|
rust
|
|
|
|
RUN apk add cargo
|
|
|
|
ARG TXOO_GIT_HASH=528fa92e5def1b6cc19127f2242137bf6f13550d
|
|
ARG TXOO_REPO=https://gitlab.com/lightning-signer/txoo.git
|
|
RUN git clone --recurse-submodules $TXOO_REPO && \
|
|
cd txoo && \
|
|
git checkout $TXOO_GIT_HASH && \
|
|
cargo build --release -p txood
|
|
|
|
# txoo runner
|
|
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as runner
|
|
|
|
LABEL maintainer.0="Lakshya Singh (@king-11)" \
|
|
maintainer.1="Dev Random (@devrandom01)"
|
|
|
|
RUN apk update && \
|
|
apk add \
|
|
build-base \
|
|
bind-tools \
|
|
libev-dev \
|
|
curl-dev
|
|
|
|
COPY --from=builder /build/txoo/target/release/txood /usr/bin/txood
|
|
|
|
COPY txood/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
VOLUME ["/root/.txoo/"]
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["txood"]
|