Skip to content

Commit

Permalink
amazonlinux build with Ruby 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ithanil committed Dec 13, 2024
1 parent 0e3cee0 commit 5ed7110
Show file tree
Hide file tree
Showing 5 changed files with 939 additions and 741 deletions.
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

23 changes: 14 additions & 9 deletions dockerfiles/v3/amazonlinux
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM amazonlinux:2 AS amazonlinux
SHELL ["/bin/bash", "-c"]

ARG RAILS_ROOT=/usr/src/app
ENV RAILS_ROOT=${RAILS_ROOT}
Expand All @@ -18,20 +19,24 @@ WORKDIR $RAILS_ROOT
# Install Node.js (needed for yarn)
RUN curl -sL https://rpm.nodesource.com/setup_16.x | bash -
RUN yum -y install nodejs
RUN yum -y install yarn gcc-c++ make
RUN yum -y install yarn gcc-c++ make libyaml-devel libffi-devel glibc-devel readline-devel openssl-devel

# Install Ruby & Rails
# Install basic packages
RUN curl -sL -o /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo
RUN amazon-linux-extras enable ruby3.0

RUN yum -y install git tar gzip yarn shared-mime-info libxslt zlib-devel ruby-devel rubygems-devel rubygem-bundler rubygem-io-console rubygem-irb rubygem-json rubygem-minitest rubygem-net-http-persistent rubygem-net-telnet rubygem-power_assert rubygem-rake rubygem-test-unit rubygem-thor rubygem-xmlrpc rubygem-bigdecimal
RUN yum -y install python3 python3-pip shadow-utils
RUN gem install rails

RUN yum -y install git tar gzip yarn shared-mime-info libxslt zlib-devel python3 python3-pip shadow-utils python3 python3-pip shadow-utils
RUN amazon-linux-extras install postgresql13
RUN yum -y install postgresql-devel

RUN amazon-linux-extras list | grep ruby
# Install Ruby & Rails
RUN git clone https://github.com/rbenv/rbenv.git /root/.rbenv && \
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> /root/.bashrc && \
echo 'eval "$(rbenv init -)"' >> /root/.bashrc && \
git clone https://github.com/rbenv/ruby-build.git /root/.rbenv/plugins/ruby-build && \
/root/.rbenv/bin/rbenv install 3.3.6 && \
/root/.rbenv/bin/rbenv global 3.3.6 && \
/root/.rbenv/bin/rbenv rehash
ENV PATH="/root/.rbenv/shims:/root/.rbenv/bin:$PATH"
RUN gem install bundler -v '~> 2.5'

COPY . ./
RUN bundle install -j4 \
Expand Down
11 changes: 5 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"react-colorful": "^5.6.1",
"react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
"react-hook-form": "^7.28.0",
"react-hook-form": "<7.52",
"react-i18next": "^11.18.5",
"react-query": "^3.34.16",
"react-router-dom": "^6.4.3",
Expand Down
Loading

0 comments on commit 5ed7110

Please sign in to comment.