on iko/hoon help sign in
prybar/scripts/docker-install.sh
100 lines 2.4 kB history raw
1#!/usr/bin/env bash
3set -e
4set -o pipefail
6cd /tmp
8packages="
10# languages
11default-jre-headless
12emacs-nox
13liblua5.1-dev
14nodejs
15ocaml
16ocaml-findlib
17opam
18python-dev
19ruby2.7-dev
20sqlite3
21tcl-dev
23# install the same version of Python in this image that we intend to use with
24# Python in prod, since Prybar is dynamically linked.
25python3.8-dev
27# build and test
28bsdmainutils
29build-essential
30expect
32# things we link against
33libreadline-dev
35# used during installation
36git
37wget
39# used during runtime
40rlwrap
45export DEBIAN_FRONTEND=noninteractive
46apt-get update
47apt install software-properties-common -y
48apt-get install -y curl
49curl -sL https://deb.nodesource.com/setup_14.x | bash -
50apt-get install -y $(grep -v "^#" <<< "$packages")
51rm -rf /var/lib/apt/lists/*
53printf "\n" | add-apt-repository ppa:deadsnakes/ppa
54apt install python3.10 -y
55apt install python3.10-dev -y
57go_version=1.16.5
58wget "https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz"
59tar -xvf "go${go_version}.linux-amd64.tar.gz"
60mv go /usr/local
61rm -f "go${go_version}.linux-amd64.tar.gz"
62rm -rf go
64clojure_version=1.10.1.478
65wget "https://download.clojure.org/install/linux-install-${clojure_version}.sh"
66chmod +x "linux-install-${clojure_version}.sh"
67"./linux-install-${clojure_version}.sh"
69# The version in the Disco repos is out of date (1.0 series) and does
70# not expose the API we need.
71wget -nv https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.4-linux-x86_64.tar.gz
72tar -xf *.tar.gz
73cp -R julia-*/bin/* /usr/bin/
74cp -R julia-*/include/* /usr/include/
75cp -R julia-*/lib/* /usr/lib/
76cp -R julia-*/share/* /usr/share/
77rm -rf julia-*
79cat > /usr/lib/x86_64-linux-gnu/pkgconfig/julia.pc <<- EOM
80 Name: julia
81 Cflags: -I/usr/include/julia
82 Version: 1.5.4
83 Description: it's julia
84 Libs: -L/usr/lib -ljulia
85EOM
87wget -nv https://downloads.lightbend.com/scala/2.13.1/scala-2.13.1.tgz
88tar -xf *.tgz
89cp -R scala-*/bin/* /usr/local/bin/
90cp -R scala-*/lib/* /usr/local/lib/
91rm -rf scala-*
93# prybar-elisp has support for automatically running inside a Cask
94# environment if there is a Cask file in the working directory. Might
95# as well install Cask so it's easy to test.
96git clone https://github.com/cask/cask.git /usr/local/cask
97ln -s /usr/local/cask/bin/cask /usr/local/bin/cask
98cask upgrade-cask
100rm /tmp/docker-install.sh