Skip to content

Commit e6a4b3e

Browse files
committed
Install ruby 3.4.0
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
1 parent c6e8653 commit e6a4b3e

File tree

4 files changed

+28
-9
lines changed

4 files changed

+28
-9
lines changed

.github/workflows/containers.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
uses: actions/setup-node@v4
4949
with:
5050
node-version: '22.x'
51+
- uses: oras-project/setup-oras@v1
5152
- name: Trim CI agent
5253
run: |
5354
chmod +x ci/free_disk_space.sh

.github/workflows/master.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
uses: actions/setup-node@v4
3535
with:
3636
node-version: '22.x'
37+
- uses: oras-project/setup-oras@v1
3738
- name: Delete `.rustup` directory
3839
run: rm -rf /home/runner/.rustup # to save disk space
3940
if: runner.os == 'Linux'

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
uses: actions/setup-node@v4
4141
with:
4242
node-version: '22.x'
43+
- uses: oras-project/setup-oras@v1
4344
- name: Delete `.rustup` directory
4445
run: rm -rf /home/runner/.rustup # to save disk space
4546
if: runner.os == 'Linux'

ci/Dockerfile

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM almalinux:9.4-minimal
1+
FROM almalinux:9.4
22

33
LABEL maintainer="appthreat" \
44
org.opencontainers.image.authors="Team AppThreat <cloud@appthreat.com>" \
55
org.opencontainers.image.source="https://github.com/appthreat/chen" \
66
org.opencontainers.image.url="https://github.com/appthreat/chen" \
7-
org.opencontainers.image.version="2.2.x" \
7+
org.opencontainers.image.version="2.3.x" \
88
org.opencontainers.image.vendor="appthreat" \
99
org.opencontainers.image.licenses="Apache-2.0" \
1010
org.opencontainers.image.title="chen" \
@@ -32,8 +32,11 @@ ENV JAVA_VERSION=$JAVA_VERSION \
3232
CHEN_INSTALL_DIR=/opt/workspace \
3333
PHP_PARSER_BIN=/opt/vendor/bin/php-parse \
3434
CDXGEN_NO_BANNER=true \
35-
COMPOSER_ALLOW_SUPERUSER=1
36-
ENV PATH=/opt/miniconda3/bin:${PATH}:/opt/platform:${JAVA_HOME}/bin:${MAVEN_HOME}/bin:${GRADLE_HOME}/bin:/usr/local/bin/:/root/.local/bin:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:
35+
COMPOSER_ALLOW_SUPERUSER=1 \
36+
MALLOC_CONF="dirty_decay_ms:2000,narenas:2,background_thread:true" \
37+
RUBY_CONFIGURE_OPTS="--with-jemalloc --enable-yjit" \
38+
RUBYOPT="--yjit"
39+
ENV PATH=/opt/miniconda3/bin:${PATH}:/opt/platform:${JAVA_HOME}/bin:${MAVEN_HOME}/bin:${GRADLE_HOME}/bin:/usr/local/bin/:/root/.local/bin:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:/root/.rbenv/bin:
3740

3841
WORKDIR /opt
3942
COPY ./ci/conda-install.sh /opt/
@@ -56,8 +59,22 @@ RUN set -e; \
5659
*) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;; \
5760
esac; \
5861
echo -e "[nodejs]\nname=nodejs\nstream=20\nprofiles=\nstate=enabled\n" > /etc/dnf/modules.d/nodejs.module \
59-
&& microdnf install -y gcc git-core php php-cli php-curl php-zip php-bcmath php-json php-pear php-mbstring php-devel make wget bash graphviz graphviz-gd \
60-
pcre2 findutils which tar gzip zip unzip sudo nodejs ncurses sqlite-devel glibc-common glibc-all-langpacks \
62+
&& dnf install -y --nodocs gcc git-core php php-cli php-curl php-zip php-bcmath php-json php-pear php-mbstring php-devel make wget bash graphviz graphviz-gd \
63+
openssl-devel libffi-devel readline-devel libyaml zlib-devel ncurses ncurses-devel rust \
64+
pcre2 findutils which tar gzip zip unzip sudo nodejs sqlite-devel glibc-common glibc-all-langpacks \
65+
&& dnf install -y epel-release \
66+
&& dnf config-manager --set-enabled crb \
67+
&& dnf install -y --nodocs libyaml-devel jemalloc-devel \
68+
&& git clone https://github.com/rbenv/rbenv.git --depth=1 ~/.rbenv \
69+
&& echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc \
70+
&& echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc \
71+
&& source ~/.bashrc \
72+
&& mkdir -p "$(rbenv root)/plugins" \
73+
&& git clone https://github.com/rbenv/ruby-build.git --depth=1 "$(rbenv root)/plugins/ruby-build" \
74+
&& rbenv install 3.4.0 \
75+
&& rbenv global 3.4.0 \
76+
&& ruby --version \
77+
&& which ruby \
6178
&& mkdir -p /opt/miniconda3 /opt/workspace \
6279
&& wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-${ARCH_NAME}.sh -O /opt/miniconda3/miniconda.sh \
6380
&& bash /opt/miniconda3/miniconda.sh -b -u -p /opt/miniconda3 \
@@ -70,7 +87,7 @@ RUN set -e; \
7087
&& conda config --add channels conda-forge \
7188
&& conda init bash \
7289
&& bash -c /opt/conda-install.sh \
73-
&& curl -LO https://repo.almalinux.org/almalinux/9/CRB/${ARCH_NAME}/os/Packages/graphviz-devel-2.44.0-26.el9.${ARCH_NAME}.rpm \
90+
&& curl -LO https://repo.almalinux.org/almalinux/10/CRB/${ARCH_NAME}/os/Packages/graphviz-devel-2.44.0-26.el9.${ARCH_NAME}.rpm \
7491
&& rpm -ivh graphviz-devel-2.44.0-26.el9.${ARCH_NAME}.rpm \
7592
&& rm graphviz-devel-2.44.0-26.el9.${ARCH_NAME}.rpm \
7693
&& curl -s "https://get.sdkman.io" | bash \
@@ -82,7 +99,6 @@ RUN set -e; \
8299
&& sdk offline enable \
83100
&& mv /root/.sdkman/candidates/* /opt/ \
84101
&& rm -rf /root/.sdkman \
85-
&& microdnf install -y epel-release \
86102
&& mkdir -p ${ANDROID_HOME}/cmdline-tools \
87103
&& curl -L https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -o ${ANDROID_HOME}/cmdline-tools/android_tools.zip \
88104
&& unzip ${ANDROID_HOME}/cmdline-tools/android_tools.zip -d ${ANDROID_HOME}/cmdline-tools/ \
@@ -107,5 +123,5 @@ RUN unzip -q chen.zip \
107123
&& composer update --no-progress --prefer-dist --ignore-platform-reqs \
108124
&& python -m pip install --no-deps . \
109125
&& rm chen.zip conda-install.sh pyproject.toml \
110-
&& microdnf clean all
126+
&& dnf clean all
111127
CMD ["chennai"]

0 commit comments

Comments
 (0)