/scripts/docker-install.sh

https://github.com/replit/prybar · Shell · 86 lines · 56 code · 17 blank · 13 comment · 0 complexity · 11295894cbc66882f64a1fb04eba1b16 MD5 · raw file

  1. #!/usr/bin/env bash
  2. set -e
  3. set -o pipefail
  4. cd /tmp
  5. packages="
  6. # languages
  7. default-jre-headless
  8. emacs-nox
  9. liblua5.1-dev
  10. nodejs
  11. ocaml
  12. ocaml-findlib
  13. opam
  14. python-dev
  15. ruby2.7-dev
  16. sqlite3
  17. tcl-dev
  18. # install the same version of Python in this image that we intend to use with
  19. # Python in prod, since Prybar is dynamically linked.
  20. python3.8-dev
  21. # build and test
  22. bsdmainutils
  23. build-essential
  24. expect
  25. # things we link against
  26. libreadline-dev
  27. # used during installation
  28. git
  29. wget
  30. # used during runtime
  31. rlwrap
  32. "
  33. export DEBIAN_FRONTEND=noninteractive
  34. apt-get update
  35. apt-get install -y curl
  36. curl -sL https://deb.nodesource.com/setup_14.x | bash -
  37. apt-get install -y $(grep -v "^#" <<< "$packages")
  38. rm -rf /var/lib/apt/lists/*
  39. go_version=1.16.5
  40. wget "https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz"
  41. tar -xvf "go${go_version}.linux-amd64.tar.gz"
  42. mv go /usr/local
  43. rm -f "go${go_version}.linux-amd64.tar.gz"
  44. rm -rf go
  45. clojure_version=1.10.1.478
  46. wget "https://download.clojure.org/install/linux-install-${clojure_version}.sh"
  47. chmod +x "linux-install-${clojure_version}.sh"
  48. "./linux-install-${clojure_version}.sh"
  49. # The version in the Disco repos is out of date (1.0 series) and does
  50. # not expose the API we need.
  51. wget -nv https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.4-linux-x86_64.tar.gz
  52. tar -xf *.tar.gz
  53. cp -R julia-*/bin/* /usr/bin/
  54. cp -R julia-*/include/* /usr/include/
  55. cp -R julia-*/lib/* /usr/lib/
  56. cp -R julia-*/share/* /usr/share/
  57. rm -rf julia-*
  58. wget -nv https://downloads.lightbend.com/scala/2.13.1/scala-2.13.1.tgz
  59. tar -xf *.tgz
  60. cp -R scala-*/bin/* /usr/local/bin/
  61. cp -R scala-*/lib/* /usr/local/lib/
  62. rm -rf scala-*
  63. # prybar-elisp has support for automatically running inside a Cask
  64. # environment if there is a Cask file in the working directory. Might
  65. # as well install Cask so it's easy to test.
  66. git clone https://github.com/cask/cask.git /usr/local/cask
  67. ln -s /usr/local/cask/bin/cask /usr/local/bin/cask
  68. cask upgrade-cask
  69. rm /tmp/docker-install.sh