Skip to content

Commit

Permalink
Various updates for docker images (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianks authored Dec 14, 2024
1 parent fc2923e commit beaf680
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 27 deletions.
8 changes: 4 additions & 4 deletions docker/Dockerfile.aarch64-linux
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.6.0-mri-aarch64-linux

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="aarch64-linux" \
RUST_TARGET="aarch64-unknown-linux-gnu" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
PKG_CONFIG_ALLOW_CROSS="1" \
RUSTUP_HOME="/usr/local/rustup" \
CARGO_HOME="/usr/local/cargo" \
PATH="/usr/local/cargo/bin:$PATH" \
LIBCLANG_PATH="/usr/lib/llvm-10/lib" \
LIBCLANG_PATH="/usr/lib/llvm-12/lib" \
CC_aarch64_unknown_linux_gnu="aarch64-linux-gnu-gcc" \
CXX_aarch64_unknown_linux_gnu="aarch64-linux-gnu-g++" \
AR_aarch64_unknown_linux_gnu="aarch64-linux-gnu-ar" \
BINDGEN_EXTRA_CLANG_ARGS_aarch64_unknown_linux_gnu="--sysroot=/usr/aarch64-linux-gnu" \
PKG_CONFIG_PATH_aarch64_unknown_linux_gnu="/usr/lib/aarch64-linux-gnu/pkgconfig" \
CMAKE_aarch64_unknown_linux_gnu="/opt/cmake/bin/cmake" \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="/usr/bin/aarch64-linux-gnu-gcc"
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="aarch64-linux-gnu-gcc"

COPY setup/lib.sh setup/rustup.sh setup/rubygems.sh setup/cmake.sh setup/rubybashrc.sh setup/rb-sys-dock.sh /

RUN bash -c "source /lib.sh && install_packages libclang-dev clang llvm-dev libc6-arm64-cross libc6-dev-arm64-cross" && \
RUN bash -c "source /lib.sh && install_packages libclang-12-dev llvm-12-dev clang-12 libc6-arm64-cross libc6-dev-arm64-cross" && \
/rustup.sh && \
/rubygems.sh && \
/cmake.sh && \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.aarch64-linux-musl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.6.0-mri-aarch64-linux-musl

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="aarch64-linux-musl" \
RUST_TARGET="aarch64-unknown-linux-musl" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.arm-linux
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.6.0-mri-arm-linux

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="arm-linux" \
RUST_TARGET="arm-unknown-linux-gnueabihf" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.arm64-darwin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.6.0-mri-arm64-darwin

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="arm64-darwin" \
RUST_TARGET="aarch64-apple-darwin" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.x64-mingw-ucrt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.6.0-mri-x64-mingw-ucrt

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="x64-mingw-ucrt" \
RUST_TARGET="x86_64-pc-windows-gnu" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.x64-mingw32
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.6.0-mri-x64-mingw32

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="x64-mingw32" \
RUST_TARGET="x86_64-pc-windows-gnu" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.x86-linux
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.6.0-mri-x86-linux

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="x86-linux" \
RUST_TARGET="i686-unknown-linux-gnu" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.x86-mingw32
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG LLVM_MINGW_VERSION=20231128 \
LLVM_MINGW_SHA256=2d532648bfd202bfe5edfa8b7f6c55970f65639779f34115a9a8bfa6f7d87f0b \
LLVM_MINGW_LIBCLANG_VERSION=14.0.0

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="x86-mingw32" \
RUST_TARGET="i686-pc-windows-gnu" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.x86_64-darwin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.6.0-mri-x86_64-darwin

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="x86_64-darwin" \
RUST_TARGET="x86_64-apple-darwin" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
Expand Down
21 changes: 11 additions & 10 deletions docker/Dockerfile.x86_64-linux
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.6.0-mri-x86_64-linux

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="x86_64-linux" \
RUST_TARGET="x86_64-unknown-linux-gnu" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
PKG_CONFIG_ALLOW_CROSS="1" \
RUSTUP_HOME="/usr/local/rustup" \
CARGO_HOME="/usr/local/cargo" \
PATH="/usr/local/cargo/bin:$PATH" \
LIBCLANG_PATH="/opt/rh/llvm-toolset-7/root/usr/lib64" \
CC_x86_64_unknown_linux_gnu="x86_64-redhat-linux-gcc" \
CXX_x86_64_unknown_linux_gnu="x86_64-redhat-linux-g++" \
AR_x86_64_unknown_linux_gnu="ar" \
BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu="--sysroot=/usr -I/usr/lib/gcc/x86_64-redhat-linux/4.8.2/include" \
CMAKE_x86_64_unknown_linux_gnu="/opt/cmake/bin/cmake"
LIBCLANG_PATH="/usr/lib/llvm-12/lib" \
CC_x86_64_unknown_linux_gnu="x86_64-linux-gnu-gcc" \
CXX_x86_64_unknown_linux_gnu="x86_64-linux-gnu-g++" \
AR_x86_64_unknown_linux_gnu="x86_64-linux-gnu-ar" \
BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu="--sysroot=/usr/x86_64-linux-gnu/" \
PKG_CONFIG_PATH_aarch64_unknown_linux_gnu="/usr/lib/x86_64-linux-gnu/pkgconfig" \
CMAKE_x86_64_unknown_linux_gnu="/opt/cmake/bin/cmake" \
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER="x86_64-linux-gnu-gcc"

COPY setup/lib.sh setup/rustup.sh setup/rubygems.sh setup/cmake.sh setup/rubybashrc.sh setup/rb-sys-dock.sh /

RUN bash -c "source /lib.sh && install_packages llvm-toolset-7" && \
RUN bash -c "source /lib.sh && install_packages libclang-12-dev llvm-12-dev clang-12 libc6-amd64-cross libc6-dev-amd64-cross" && \
/rustup.sh && \
/rubygems.sh && \
/cmake.sh && \
/rubybashrc.sh && \
/rb-sys-dock.sh && \
rm -rf /var/cache/yum
/rb-sys-dock.sh
2 changes: 1 addition & 1 deletion docker/Dockerfile.x86_64-linux-musl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/rake-compiler/rake-compiler-dock-image:1.6.0-mri-x86_64-linux-musl

ENV RUBY_CC_VERSION="3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
ENV RUBY_CC_VERSION="3.4.0:3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0" \
RUBY_TARGET="x86_64-linux-musl" \
RUST_TARGET="x86_64-unknown-linux-musl" \
RUSTUP_DEFAULT_TOOLCHAIN="stable" \
Expand Down
4 changes: 2 additions & 2 deletions docker/setup/cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -eo pipefail
source /lib.sh

main() {
local version=3.24.2
local version=3.28.3

if ! command -v curl &> /dev/null; then
install_packages curl
Expand All @@ -30,4 +30,4 @@ main() {
rm "${0}"
}

main "${@}"
main "${@}"
4 changes: 2 additions & 2 deletions docker/setup/rubygems.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ set -euo pipefail
source /lib.sh

main() {
rubygems_version="3.4.4"
bundler_version="2.4.4"
rubygems_version="3.5.23"
bundler_version="2.5.23"

gem update --no-document --system $rubygems_version
gem install bundler:$bundler_version --no-document
Expand Down

0 comments on commit beaf680

Please sign in to comment.