#!/bin/bash
set -e
-RUBY_VERSION="2.7.6"
+RUBY_VERSION="3.2.0-dev"
+export CONFIGURE_OPTS="--enable-yjit"
+
+apt-get -y install --no-install-recommends ruby bison
mkdir /src
git -C /src clone https://github.com/rbenv/ruby-build.git
cd / && rm -fr /src
ruby-build ${RUBY_VERSION} /usr/local
+
+apt-get -y purge ruby
--- /dev/null
+#!/bin/bash
+set -e
+
+export RUSTUP_HOME=/usr/local/rustup
+export CARGO_HOME=/usr/local/cargo
+export PATH=/usr/local/cargo/bin:$PATH
+export RUST_VERSION=1.65.0
+
+dpkgArch="$(dpkg --print-architecture)"
+
+case "${dpkgArch##*-}" in
+ amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='5cc9ffd1026e82e7fb2eec2121ad71f4b0f044e88bca39207b3f6b769aaa799c' ;;
+ armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='48c5ecfd1409da93164af20cf4ac2c6f00688b15eb6ba65047f654060c844d85' ;;
+ arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='e189948e396d47254103a49c987e7fb0e5dd8e34b200aa4481ecc4b8e41fb929' ;;
+ i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='0e0be29c560ad958ba52fcf06b3ea04435cb3cd674fbe11ce7d954093b9504fd' ;;
+ *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;;
+esac
+
+url="https://static.rust-lang.org/rustup/archive/1.25.1/${rustArch}/rustup-init"
+wget "$url"
+echo "${rustupSha256} *rustup-init" | sha256sum -c -
+chmod +x rustup-init
+./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}
+rm rustup-init
+chmod -R a+w $RUSTUP_HOME $CARGO_HOME
+rustup --version
+cargo --version
+rustc --version
# VERSION: release
FROM debian:bullseye-slim
-ENV PG_MAJOR 13
-ENV RUBY_ALLOCATOR /usr/lib/libjemalloc.so.1
-ENV RAILS_ENV production
+ENV PG_MAJOR=13 \
+ RUBY_ALLOCATOR=/usr/lib/libjemalloc.so.1 \
+ RAILS_ENV=production \
+ RUSTUP_HOME=/usr/local/rustup \
+ CARGO_HOME=/usr/local/cargo \
+ PATH=/usr/local/cargo/bin:$PATH
#LABEL maintainer="Sam Saffron \"https://twitter.com/samsaffron\""
ADD install-redis /tmp/install-redis
RUN /tmp/install-redis
+ADD install-rust /tmp/install-rust
+RUN /tmp/install-rust
+
ADD install-ruby /tmp/install-ruby
RUN /tmp/install-ruby