Dockerfile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. FROM debian:latest
  2. ENV SBCL_VERSION 1.3.20
  3. ENV DOWNLOAD_URL http://prdownloads.sourceforge.net/sbcl
  4. ENV DOWNLOAD_PACKAGE sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2
  5. ENV SHA256_SUM cda8d3f36eaaa52e0bda8042cf2e49a2ca1b71e5076eb78104de012cff91c95d
  6. RUN apt-get update &&\
  7. apt-get install -y \
  8. bzip2 \
  9. gcc \
  10. git \
  11. curl \
  12. make \
  13. libev-dev &&\
  14. cd /tmp &&\
  15. curl -OL $DOWNLOAD_URL/$DOWNLOAD_PACKAGE &&\
  16. echo "$SHA256_SUM $DOWNLOAD_PACKAGE" | sha256sum -c &&\
  17. tar xvf ${DOWNLOAD_PACKAGE} &&\
  18. cd sbcl-${SBCL_VERSION}-x86-64-linux &&\
  19. INSTALL_ROOT=/usr sh install.sh &&\
  20. mkdir -p /usr/local/lib &&\
  21. ln -s /usr/lib/sbcl /usr/local/lib/sbcl &&\
  22. rm -rf /tmp/sbcl* &&\
  23. rm -rf /var/lib/apt/lists/* && \
  24. cd ~ &&\
  25. echo "Finished installing SBCL. Now it's time for Quicklisp." &&\
  26. curl -o /tmp/quicklisp.lisp https://beta.quicklisp.org/quicklisp.lisp &&\
  27. echo | sbcl --load /tmp/quicklisp.lisp --eval '(quicklisp-quickstart:install :path "/opt/quicklisp")' --eval '(quicklisp:add-to-init-file)' --eval '(sb-ext:quit)'
  28. WORKDIR /opt/quicklisp/local-projects/
  29. RUN git clone https://github.com/fukamachi/woo.git &&\
  30. git clone https://github.com/fukamachi/fast-http.git &&\
  31. git clone https://github.com/fukamachi/lack.git &&\
  32. git clone https://github.com/fukamachi/clack.git &&\
  33. git clone https://github.com/fukamachi/myway.git &&\
  34. git clone https://github.com/fukamachi/quri.git &&\
  35. mkdir -p /opt/quicklisp/local-projects/travels
  36. COPY travels.asd *.lisp travels/
  37. RUN sbcl --eval '(ql:quickload :travels)' --eval '(sb-ext:quit)'
  38. EXPOSE 80
  39. CMD ["sbcl", "--dynamic-space-size", "4096", "--eval", "(ql:quickload :travels)", "--eval", "(travels:main :port 80 :data \"/tmp/data/data.zip\" :worker-num 4)"]