Dockerfile.alpine 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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.62
  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 "process didn't exit successfully: /opt/darkfi/target/release/deps/darkfi-7ff55152bc1bdc59 (signal: 11, SIGSEGV: invalid memory reference)" \
  12. && echo "rust ${RUST_VER} / alpine ${ALPINE_VER}" \
  13. && rustc -V && cargo -V \
  14. && cat /etc/os-release \
  15. && echo "====>>>>> wait 30 sec to continue; CTRL+C to break" \
  16. && sleep 30
  17. RUN apk update
  18. RUN apk add cmake jq wget clang curl gcc make
  19. RUN apk add llvm-dev openssl-dev expat-dev freetype-dev
  20. RUN apk add libudev-zero-dev libgudev-dev
  21. RUN apk add pkgconf clang-dev
  22. RUN apk add build-base
  23. # musl-dev was enough, maybe libc-dev too
  24. RUN mkdir /opt/darkfi
  25. COPY . /opt/darkfi
  26. WORKDIR /opt/darkfi
  27. RUN make clean
  28. RUN rm -rf ./target/*
  29. RUN make -j test