From 4b0060ae23ea667b47f07c0b2a9aa630f16930e2 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Fri, 3 Oct 2025 16:01:07 +0200 Subject: [PATCH 1/2] Remove selenium as we no longer use it --- image/discourse_dev/Dockerfile | 2 -- image/discourse_dev/install-selenium | 25 ------------------------- 2 files changed, 27 deletions(-) delete mode 100755 image/discourse_dev/install-selenium diff --git a/image/discourse_dev/Dockerfile b/image/discourse_dev/Dockerfile index 1f62ff7eb..bbe0996e0 100644 --- a/image/discourse_dev/Dockerfile +++ b/image/discourse_dev/Dockerfile @@ -58,8 +58,6 @@ RUN mv /shared/postgres_data /shared/postgres_data_orig ADD ensure-database /etc/runit/1.d/ensure-database ADD install-rust /tmp/install-rust -ADD install-selenium /tmp/install-selenium -RUN /tmp/install-selenium # Install & Configure MailHog (https://github.com/mailhog/MailHog) RUN wget -qO /tmp/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.1/MailHog_linux_amd64\ diff --git a/image/discourse_dev/install-selenium b/image/discourse_dev/install-selenium deleted file mode 100755 index ff3cbb20e..000000000 --- a/image/discourse_dev/install-selenium +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -set -e - -# The Selenium gem isn’t shipped with the `selenium-manager` binary for aarch64 -# (yet). So we have to compile it ourselves. -if [ "$(dpkg --print-architecture)" = "arm64" ]; then - apt update && apt install -y firefox-esr chromium-driver - cd /tmp - /tmp/install-rust - git clone --depth 1 --no-checkout https://github.com/SeleniumHQ/selenium.git - cd selenium - git sparse-checkout set rust - git checkout - cd rust - cargo build --release - cp target/release/selenium-manager /usr/local/bin - rustup self uninstall -y - cd / - rm -rf /tmp/* -else - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - &&\ - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list &&\ - apt update &&\ - apt install -y google-chrome-stable firefox-esr chromium-driver -fi From 9f5aade13aee14b4014b5b8660ca851f03b64e4f Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Fri, 3 Oct 2025 16:02:03 +0200 Subject: [PATCH 2/2] Remove rust --- .gitignore | 1 - image/auto_build.rb | 1 - image/base/install-rust | 30 ------------------------------ image/discourse_dev/Dockerfile | 7 +------ 4 files changed, 1 insertion(+), 38 deletions(-) delete mode 100755 image/base/install-rust diff --git a/.gitignore b/.gitignore index 95019dc32..4bf7db49b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ image/squash.tar image/nsenter/nsenter image/docker-squash image/docker-squash.tar.gz -image/discourse_dev/install-rust image/discourse_dev/postgres.template.yml image/discourse_dev/redis.template.yml .gc-state/* diff --git a/image/auto_build.rb b/image/auto_build.rb index 653005b80..02efdde7f 100644 --- a/image/auto_build.rb +++ b/image/auto_build.rb @@ -159,7 +159,6 @@ def dev_deps() "sed -e 's/\(db_name: discourse\)/\1_development/' ../templates/postgres.template.yml > discourse_dev/postgres.template.yml", ) run("cp ../templates/redis.template.yml discourse_dev/redis.template.yml") - run("cp base/install-rust discourse_dev/install-rust") end if ARGV.length == 0 diff --git a/image/base/install-rust b/image/base/install-rust deleted file mode 100755 index ef554eaa1..000000000 --- a/image/base/install-rust +++ /dev/null @@ -1,30 +0,0 @@ -#!/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.82.0 -export RUSTUP_VERSION=1.25.2 - -dpkgArch="$(dpkg --print-architecture)" - -case "${dpkgArch##*-}" in - amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='bb31eaf643926b2ee9f4d8d6fc0e2835e03c0a60f34d324048aa194f0b29a71c' ;; - armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='6626b90205d7fe7058754c8e993b7efd91dedc6833a11a225b296b7c2941194f' ;; - arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='4ccaa7de6b8be1569f6b764acc28e84f5eca342f5162cd5c810891bff7ed7f74' ;; - i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='34392b53a25c56435b411d3e575b63aab962034dd1409ba405e708610c829607' ;; - *) 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 diff --git a/image/discourse_dev/Dockerfile b/image/discourse_dev/Dockerfile index bbe0996e0..9f9f4bff8 100644 --- a/image/discourse_dev/Dockerfile +++ b/image/discourse_dev/Dockerfile @@ -37,10 +37,7 @@ RUN /pups/bin/pups /pups/redis.yml RUN locale-gen en_US.UTF-8 ENV LANG=en_US.UTF-8 \ LANGUAGE=en_US:en \ - LC_ALL=en_US.UTF-8 \ - RUSTUP_HOME=/usr/local/rustup \ - CARGO_HOME=/usr/local/cargo \ - PATH=/usr/local/cargo/bin:$PATH + LC_ALL=en_US.UTF-8 # get postgres going ADD postgres.template.yml /pups/postgres.yml @@ -57,8 +54,6 @@ RUN mv /shared/postgres_data /shared/postgres_data_orig # invocations when used with a mounted volume) ADD ensure-database /etc/runit/1.d/ensure-database -ADD install-rust /tmp/install-rust - # Install & Configure MailHog (https://github.com/mailhog/MailHog) RUN wget -qO /tmp/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.1/MailHog_linux_amd64\ && echo "e2ed634ded49929f089b20045581955ed217672078fd86082dd7a6c67c5d09c7 /tmp/mailhog" | sha256sum -c -\