Dockerfile.alpine 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Use: docker build . -t darkfi:alpine${alpine_ver}_rust${rust_ver} -f ./contrib/docker/Dockerfile.alpine
  2. # optionally with: --build-arg ALPINE_VER=$alpine_ver --build-arg RUST_VER=$rust_ver
  3. # The wallet test fail problem (see below) was the same for alpine {3.14,3.15,3.16} and rust {1.60,1.61,1.62}
  4. ARG RUST_VER=1.64
  5. ARG ALPINE_VER=3.16
  6. FROM rust:${RUST_VER}-alpine${ALPINE_VER}
  7. ARG RUST_VER
  8. ARG ALPINE_VER
  9. RUN echo "=======================================================" \
  10. &&echo "===>>>>> The following error will occur during the test::" \
  11. && echo "test util::parse::tests::test_truncate ... ok" \
  12. && echo "test runtime::memory::tests::can_read_from_memory ... ok" \
  13. && echo "error: test failed, to rerun pass '-p darkfi --lib'" \
  14. && echo ".... process didn't exit successfully: /opt/darkfi/target/release/deps/darkfi-... (signal: 11, SIGSEGV: invalid memory reference)" \
  15. && echo "rust ${RUST_VER} / alpine ${ALPINE_VER}" \
  16. && rustc -V && cargo -V \
  17. && cat /etc/os-release \
  18. && echo "====>>>>> wait 30 sec to continue; CTRL+C to break" \
  19. && sleep 30
  20. RUN apk update
  21. RUN apk add cmake jq wget clang curl gcc make
  22. RUN apk add llvm-dev openssl-dev expat-dev freetype-dev
  23. RUN apk add libudev-zero-dev libgudev-dev
  24. RUN apk add pkgconf clang-dev fontconfig-dev
  25. RUN apk add build-base
  26. # musl-dev was enough, maybe libc-dev too
  27. RUN mkdir /opt/darkfi
  28. COPY . /opt/darkfi
  29. WORKDIR /opt/darkfi
  30. RUN make clean
  31. RUN rm -rf ./target/*
  32. RUN make -j test