mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
26 lines
650 B
Docker
26 lines
650 B
Docker
ARG BASE_IMAGE
|
|
|
|
FROM --platform=linux/amd64 ${BASE_IMAGE} AS build
|
|
|
|
COPY scripts/prepare_torch.sh /w/scripts/prepare_torch.sh
|
|
COPY scripts/android/build_torch.sh /w/scripts/android/build_torch.sh
|
|
ARG UID=10001
|
|
ARG GID=10001
|
|
ARG USER=builder
|
|
RUN groupadd -g "$GID" "$USER" && \
|
|
useradd -m -u "$UID" -g "$GID" -s /bin/bash "$USER"
|
|
|
|
RUN sudo chown $UID:$GID -R /w /root
|
|
USER builder
|
|
|
|
ARG TARGET
|
|
RUN if [ -n "$TARGET" ]; then \
|
|
/w/scripts/android/build_torch.sh "$TARGET"; \
|
|
else \
|
|
/w/scripts/android/build_torch.sh; \
|
|
fi \
|
|
&& rm -rf /w/scripts/torch_dart/simplybs
|
|
|
|
FROM --platform=linux/amd64 alpine
|
|
COPY --from=build /w /w
|