forked from CircleCI-Public/cimg-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.template
44 lines (37 loc) · 1.07 KB
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# vim:set ft=dockerfile:
FROM cimg/%%PARENT%%:2021.07
LABEL maintainer="Community & Partner Engineering Team <[email protected]>"
ENV RUBY_VERSION=%%MAIN_VERSION%% \
RUBY_MAJOR=%%VERSION_MINOR%%
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \
autoconf \
bison \
dpkg-dev \
libffi-dev \
libgdbm6 \
libgdbm-dev \
libncurses5-dev \
libreadline6-dev \
libssl-dev \
libyaml-dev \
zlib1g-dev && \
# Skip installing gem docs
echo "gem: --no-document" > ~/.gemrc && \
mkdir -p ~/ruby && \
downloadURL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR}/ruby-$RUBY_VERSION.tar.gz" && \
curl -sSL $downloadURL | tar -xz -C ~/ruby --strip-components=1 && \
cd ~/ruby && \
autoconf && \
./configure && \
make -j "$(nproc)" && \
sudo make install && \
mkdir ~/.rubygems && \
sudo rm -rf ~/ruby /var/lib/apt/lists/* && \
cd && \
ruby --version && \
gem --version && \
sudo gem update --system && \
gem --version && \
bundle --version
ENV GEM_HOME /home/circleci/.rubygems
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH