woo.dockerfile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. FROM debian:bullseye-slim AS debian
  2. ENV DEBIAN_FRONTEND noninteractive
  3. ENV TERM linux
  4. ENV ROS_VERSION 22.12.14.113
  5. ENV LISP sbcl-bin/2.3.4
  6. ENV ASDF_VERSION 3.3.6
  7. ENV QUICKLISP_VERSION 2023-02-15
  8. RUN echo 'APT::Get::Install-Recommends "false";' > /etc/apt/apt.conf.d/00-general \
  9. && echo 'APT::Get::Install-Suggests "false";' >> /etc/apt/apt.conf.d/00-general \
  10. && echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf.d/00-general \
  11. && echo 'APT::Get::force-yes "true";' >> /etc/apt/apt.conf.d/00-general
  12. FROM debian AS roswell
  13. RUN apt-get update -q \
  14. && apt-get install --no-install-recommends -q -y \
  15. bzip2 \
  16. ca-certificates curl libcurl3-gnutls \
  17. make \
  18. && rm -rf /var/lib/apt/lists/* \
  19. && curl -L -O https://github.com/roswell/roswell/releases/download/v${ROS_VERSION}/roswell_${ROS_VERSION}-1_amd64.deb \
  20. && dpkg -i roswell_${ROS_VERSION}-1_amd64.deb \
  21. && ros quicklisp.dist=http://beta.quicklisp.org/dist/quicklisp/${QUICKLISP_VERSION}/distinfo.txt setup \
  22. && ros install ${LISP} \
  23. && ros use ${LISP} \
  24. && ros install asdf/${ASDF_VERSION} \
  25. && ros config \
  26. && rm roswell_${ROS_VERSION}-1_amd64.deb
  27. RUN echo 'export PATH=$HOME/.roswell/bin:$PATH' >> ~/.bashrc
  28. FROM roswell AS builder
  29. RUN apt-get update -q \
  30. && apt-get install --no-install-recommends -q -y \
  31. build-essential \
  32. libev-dev \
  33. && rm -rf /var/lib/apt/lists/*
  34. WORKDIR /woo
  35. ADD . .
  36. RUN ros build woo.ros
  37. FROM debian
  38. RUN apt-get update -q \
  39. && apt-get install --no-install-recommends -q -y \
  40. libev4 \
  41. && rm -rf /var/lib/apt/lists/*
  42. WORKDIR /woo
  43. COPY --from=builder /woo/woo .
  44. RUN ["chmod", "+x", "./woo"]
  45. EXPOSE 8080
  46. CMD ./woo --worker $(nproc) --address 0.0.0.0 --port 8080