Skip to content

Commit

Permalink
tryna fix amazonlinux build using rbenv
Browse files Browse the repository at this point in the history
  • Loading branch information
Ithanil committed Dec 11, 2024
1 parent 1ec5a18 commit af468a8
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions dockerfiles/v1/focal260-amazonlinux
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,24 @@ CMD [ "/etc/nginx/start", "-g", "daemon off;" ]

FROM amazonlinux-base AS base
# Install Node.js (needed for yarn)
RUN yum -y install gcc-c++ make
RUN yum -y install git gcc-c++ make libyaml libffi glibc-devel readline-devel openssl-devel
RUN curl -sL https://rpm.nodesource.com/setup_16.x | bash -
RUN yum -y install nodejs
# Install Ruby & Rails
RUN curl -sL -o /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo
RUN amazon-linux-extras enable ruby3.0 postgresql14 \
&& yum -y install git tar gzip yarn shared-mime-info libxslt zlib-devel sqlite-devel mariadb-devel libpq-devel ruby-devel rubygems-devel rubygem-bundler rubygem-io-console rubygem-irb rubygem-json rubygem-minitest rubygem-power_assert rubygem-rake rubygem-test-unit rubygem-bigdecimal
RUN amazon-linux-extras enable postgresql14 \
&& yum -y install tar gzip yarn shared-mime-info libxslt zlib-devel sqlite-devel mariadb-devel libpq-devel
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv && \
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc && \
echo 'eval "$(rbenv init -)"' >> ~/.bashrc && \
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build && \
~/.rbenv/bin/rbenv install 3.3.6 && \
~/.rbenv/bin/rbenv global 3.3.6 && \
~/.rbenv/bin/rbenv rehash
ENV PATH="/root/.rbenv/shims:/root/.rbenv/bin:$PATH"
RUN yum -y install python3 python3-pip shadow-utils
RUN gem install bundler -v '2.1.4'
RUN gem install bundler -v '~> 2.5'

RUN groupadd scalelite --gid 1000 && \
useradd -u 1000 -d /srv/scalelite -g scalelite scalelite
RUN groupadd scalelite-spool --gid 2000 && \
Expand Down

0 comments on commit af468a8

Please sign in to comment.