txoo: separate repo download and build

- add arg for txoo_data dir
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
Lakshya Singh 2023-11-09 22:53:42 +05:30
parent 35da6dafe0
commit 014042f409
No known key found for this signature in database
GPG Key ID: D3239BA6109A2CE7

View File

@ -12,8 +12,8 @@ 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 && \
RUN git clone --recurse-submodules $TXOO_REPO
RUN cd txoo && \
git checkout $TXOO_GIT_HASH && \
cargo build --release -p txood
@ -23,6 +23,8 @@ FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as
LABEL maintainer.0="Lakshya Singh (@king-11)" \
maintainer.1="Dev Random (@devrandom01)"
ARG TXOO_DATA=/root/.txoo
RUN apk update && \
apk add \
build-base \
@ -35,7 +37,7 @@ COPY --from=builder /build/txoo/target/release/txood /usr/bin/txood
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
VOLUME ["/root/.txoo/"]
VOLUME ["${TXOO_DATA}"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["txood"]