Newer
Older
dub_jkp / docker / Dockerfile.alpine
  1. FROM alpine:edge AS Builder
  2.  
  3. # DCPKG is the name of the package, DCBIN the name of the binary
  4. # We need this because of the ldc / ldc2 disparity
  5. ARG DCPKG
  6. ARG DCBIN
  7.  
  8. # Build dub (and install tests dependencies in the process)
  9. WORKDIR /root/build/
  10. RUN apk add --no-cache bash build-base curl curl-dev dtools dub git grep rsync $DCPKG
  11. ADD . /root/build/
  12. RUN dub test --compiler=$DCBIN && dub build --compiler=$DCBIN
  13.  
  14. # Remove dub to avoid the risk of using the wrong binary
  15. RUN apk del dub
  16.  
  17. # Used by the `run-unittest.sh` script
  18. ENV DUB=/root/build/bin/dub
  19. ENV DC=$DCBIN
  20.  
  21. # Finally, just run the test-suite
  22. WORKDIR /root/build/test/
  23. ENTRYPOINT [ "/root/build/test/run-unittest.sh" ]