| 1 | ARG BASE_IMAGE |
| 2 | FROM --platform=linux/amd64 ${BASE_IMAGE} AS build |
| 3 | |
| 4 | ARG UID=10001 |
| 5 | ARG GID=10001 |
| 6 | ARG USER=builder |
| 7 | RUN groupadd -g "$GID" "$USER" && \ |
| 8 | useradd -m -u "$UID" -g "$GID" -s /bin/bash "$USER" |
| 9 | |
| 10 | RUN sudo chown $UID:$GID -R /w /root |
| 11 | USER builder |
| 12 | RUN mkdir -p /w/scripts/linux |
| 13 | COPY scripts/prepare_moneroc.sh /w/scripts/prepare_moneroc.sh |
| 14 | COPY scripts/linux/build_monero_all.sh /w/scripts/linux/build_monero_all.sh |
| 15 | COPY scripts/functions.sh /w/scripts/functions.sh |
| 16 | RUN /w/scripts/linux/build_monero_all.sh \ |
| 17 | && rm -rf /w/scripts/monero_c/contrib/depends/simplybs \ |
| 18 | /w/scripts/monero_c/monero_libwallet2_api_c/build \ |
| 19 | /w/scripts/monero_c/wownero_libwallet2_api_c/build |
| 20 | |
| 21 | FROM --platform=linux/amd64 alpine |
| 22 | COPY --from=build /w /w |