Last active
June 29, 2024 14:42
-
-
Save popunbom/b5b6018058e3f35e930d271859e2775c to your computer and use it in GitHub Desktop.
YAFU (Yet Another Factoring Utility) on Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ########### | |
| # Stage-1 # | |
| ########### | |
| FROM alpine:3 AS builder | |
| # Add 'testing' repository | |
| RUN echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories | |
| # Install build dependencies | |
| RUN apk add \ | |
| git curl make gcc musl-dev gmp-dev zlib-dev \ | |
| ecm-dev@testing | |
| WORKDIR /src | |
| # Build: msieve | |
| RUN curl -L https://sourceforge.net/projects/msieve/files/msieve/Msieve%20v1.53/msieve153_src.tar.gz/download \ | |
| | tar xzvf - \ | |
| && mv msieve* msieve \ | |
| && make -C msieve all -j8 ECM=1 NO_ZLIB=1 | |
| # Build: ytools | |
| RUN git clone --depth=1 --recursive https://github.com/bbuhrow/ytools \ | |
| && make -C ytools -j8 CC=gcc | |
| # Build: ysieve | |
| RUN git clone --depth=1 --recursive https://github.com/bbuhrow/ysieve \ | |
| && make -C ysieve -j8 | |
| # Build: yafu | |
| RUN git clone --depth=1 --recursive https://github.com/bbuhrow/yafu \ | |
| && make -C yafu NFS=1 -j8 | |
| ########### | |
| # Stage-2 # | |
| ########### | |
| FROM alpine:3 | |
| # Add 'testing' repository | |
| RUN echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories | |
| # Install executable dependencies | |
| RUN apk add \ | |
| musl gmp ecm@testing | |
| # Copy from Stage-1 | |
| WORKDIR /yafu | |
| COPY --from=builder /src/yafu/yafu . | |
| COPY --from=builder /src/yafu/yafu.ini . | |
| ENTRYPOINT [ "/yafu/yafu" ] |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage