Update Ruby to 3.1.3 and deps bump
authorRafael dos Santos Silva <xfalcox@gmail.com>
Tue, 20 Dec 2022 22:16:26 +0000 (19:16 -0300)
committerAlan Guo Xiang Tan <gxtan1990@gmail.com>
Tue, 20 Dec 2022 22:23:16 +0000 (06:23 +0800)
image/base/VERSION [deleted file]
image/base/install-imagemagick
image/base/install-jemalloc
image/base/install-nginx
image/base/install-oxipng
image/base/install-redis
image/base/install-ruby
image/base/install-rust [new file with mode: 0755]
image/base/slim.Dockerfile

diff --git a/image/base/VERSION b/image/base/VERSION
deleted file mode 100644 (file)
index 88c5fb8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1.4.0
index 057c168c0e2d0595771507b07caff5e9aadb1a3e..15c6e594a99c7c81136ba36615740067e04fb24e 100755 (executable)
@@ -2,8 +2,8 @@
 set -e
 
 # version check: https://github.com/ImageMagick/ImageMagick/releases
-IMAGE_MAGICK_VERSION="7.1.0-20"
-IMAGE_MAGICK_HASH="c7526ca8b341e42f026f8157632b1722555f0d015c281861d9c4d314c0c8f78c"
+IMAGE_MAGICK_VERSION="7.1.0-55"
+IMAGE_MAGICK_HASH="77e1535448d6c7f951a8c9d10804246b76044b879adf5bf1f12c836ed9d4b5ec"
 
 # We use debian, but GitHub CI is stuck on Ubuntu Bionic, so this must be compatible with both
 LIBJPEGTURBO=$(cat /etc/issue | grep -qi Debian && echo 'libjpeg62-turbo libjpeg62-turbo-dev' || echo 'libjpeg-turbo8 libjpeg-turbo8-dev')
index 7d20c09197a2021776216ac63f3bea1d84b8e7e0..b07597874abbd8c986e711bf41f3562d803c993e 100755 (executable)
@@ -18,9 +18,9 @@ cd / && rm -rf /jemalloc-stable
 mkdir /jemalloc-new
 cd /jemalloc-new
 
-wget -q https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2
-sha256sum jemalloc-5.2.1.tar.bz2
-echo "34330e5ce276099e2e8950d9335db5a875689a4c6a56751ef3b1d8c537f887f6 jemalloc-5.2.1.tar.bz2" | sha256sum -c
-tar --strip-components=1 -xjf jemalloc-5.2.1.tar.bz2 
-./configure --prefix=/usr --with-install-suffix=5.2.1 && make build_lib && make install_lib
+wget -q https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2
+sha256sum jemalloc-5.3.0.tar.bz2
+echo "2db82d1e7119df3e71b7640219b6dfe84789bc0537983c3b7ac4f7189aecfeaa jemalloc-5.3.0.tar.bz2" | sha256sum -c
+tar --strip-components=1 -xjf jemalloc-5.3.0.tar.bz2 
+./configure --prefix=/usr --with-install-suffix=5.3.0 && make build_lib && make install_lib
 cd / && rm -rf /jemalloc-new
index a1616c804d9fcaa7c15f927644412f1e189c6dd0..aa24338c0ec50af042a1772ab82b03e620878161 100755 (executable)
@@ -2,8 +2,8 @@
 set -e
 
 # version check: https://nginx.org/en/download.html
-VERSION=1.21.6
-HASH="66dc7081488811e9f925719e34d1b4504c2801c81dee2920e5452a86b11405ae"
+VERSION=1.23.3
+HASH="75cb5787dbb9fae18b14810f91cc4343f64ce4c24e27302136fb52498042ba54"
 
 cd /tmp
 wget -q https://nginx.org/download/nginx-$VERSION.tar.gz
index 93b30b222ceb77945858c11de75df39f769e3713..f4f80f6aa81cfb87e80a9e01e931766ac189f296 100755 (executable)
@@ -2,9 +2,9 @@
 set -e
 
 # version check: https://github.com/shssoichiro/oxipng/releases
-OXIPNG_VERSION="5.0.1"
+OXIPNG_VERSION="7.0.0"
 OXIPNG_FILE="oxipng-${OXIPNG_VERSION}-x86_64-unknown-linux-musl.tar.gz"
-OXIPNG_HASH="89240cfd863f8007ab3ad95d88dc2ce15fc003a0421508728d73fec1375f19b6"
+OXIPNG_HASH="f794df937abcc2ef9357dcc52c39908f390461921fcbd19793f35d33120bfc8e"
 
 # Install other deps
 apt -y -q install advancecomp jhead jpegoptim libjpeg-turbo-progs optipng
index 10dde863f5405643114d6ce8227b3a7f8cd90d96..690b2640ed1e558f7d2295fd34b30733ecb8da95 100755 (executable)
@@ -2,8 +2,8 @@
 set -e
 
 # version check: https://redis.io/
-REDIS_VERSION=6.2.6
-REDIS_HASH="5b2b8b7a50111ef395bf1c1d5be11e6e167ac018125055daa8b5c2317ae131ab"
+REDIS_VERSION=7.0.7
+REDIS_HASH="8d327d7e887d1bb308fc37aaf717a0bf79f58129e3739069aaeeae88955ac586"
 
 cd /tmp
 # Prepare Redis source.
index 0c77c181e6782e4b21ab2629488e086a66697cd4..8d5ccf9516a16c2664eb26dc54be8b6b4aa2cc4f 100755 (executable)
@@ -1,7 +1,10 @@
 #!/bin/bash
 set -e
 
-RUBY_VERSION="2.7.6"
+RUBY_VERSION="3.1.3"
+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
@@ -9,3 +12,5 @@ cd /src/ruby-build && ./install.sh
 cd / && rm -fr /src
 
 ruby-build ${RUBY_VERSION} /usr/local
+
+apt-get -y purge ruby
diff --git a/image/base/install-rust b/image/base/install-rust
new file mode 100755 (executable)
index 0000000..4f3f714
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+set -e
+
+# see https://github.com/rust-lang/docker-rust/blob/master/Dockerfile-debian.template
+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
+export RUSTUP_VERSION=1.25.1
+
+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/${RUSTUP_VERSION}/${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
index 1fba35b1f75183fcf45174af9a09d30d681795da..f65d8046ee1d83de027ac312d7996ed16a76e1f8 100644 (file)
@@ -2,9 +2,12 @@
 # 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\""
 
@@ -72,6 +75,9 @@ RUN /tmp/install-oxipng
 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