| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- # Use: docker build . --pull --network=host -t darkfi:alpine -f ./contrib/docker/Dockerfile.alpine
- # optionally with: --build-arg ALPINE_VER=3.17 --build-arg RUST_VER=nightly
- # The wallet test fail problem (see below) was the same for alpine 3.17 and rust 1.65
- ARG RUST_VER=1.65
- ARG ALPINE_VER=3.17
- FROM alpine:${ALPINE_VER} as rust_builder
- ARG RUST_VER
- ARG ALPINE_VER
- RUN echo "=======================================================" \
- &&echo "===>>>>> The following error will occur during the test::" \
- && echo "test util::parse::tests::test_truncate ... ok" \
- && echo "test runtime::memory::tests::can_read_from_memory ... ok" \
- && echo "error: test failed, to rerun pass '-p darkfi --lib'" \
- && echo ".... process didn't exit successfully: /opt/darkfi/target/release/deps/darkfi-... (signal: 11, SIGSEGV: invalid memory reference)" \
- && echo "rust ${RUST_VER} / alpine ${ALPINE_VER}" \
- && cat /etc/os-release \
- && echo "====>>>>> wait 30 sec to continue; CTRL+C to break" \
- && sleep 30
- RUN apk update
- RUN apk add cmake jq wget clang curl gcc make llvm-dev \
- openssl-dev expat-dev freetype-dev libudev-zero-dev \
- libgudev-dev pkgconf clang-dev fontconfig-dev build-base bash
- # build-base ? musl-dev was enough, maybe libc-dev too
- RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain "${RUST_VER}"
- ENV PATH="/root/.cargo/bin:${PATH}"
- RUN rustup target add wasm32-unknown-unknown
- RUN cargo search whatever # creates .cargo cache
- # 2. stage
- FROM rust_builder as builder
- WORKDIR /opt/darkfi
- COPY . ./
- RUN make clean
- RUN rm -rf ./target/
- RUN bash -c 'make -j test && make -j'
- # 3. stage
- FROM alpine:${ALPINE_VER}
- RUN apk update && apk add openssl # ?? TODO lato-fonts
- WORKDIR /opt/darkfi
- COPY --from=builder /opt/darkfi/drk /opt/darkfi/darkfid /opt/darkfi/tau /opt/darkfi/taud \
- /opt/darkfi/ircd /opt/darkfi/dnetview /opt/darkfi/darkotc /opt/darkfi/darkwikid \
- /opt/darkfi/darkwiki /opt/darkfi/zkas /opt/darkfi/dao /opt/darkfi/daod ./
|