/
Dockerfile
42 lines (39 loc) · 1.05 KB
/
Dockerfile
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
# ref. https://github.com/chef/rubydistros
FROM ubuntu:22.04
ENV RUBY_MAJOR 3.3
ARG RUBY_VERSION=3.3.1
ENV RUBY_VERSION $RUBY_VERSION
ENV PATH /opt/ruby/bin:$PATH:/opt/rbenv/plugins/ruby-build/bin
# ruby-build
RUN set -ex \
&& mkdir -p /etc/network/interfaces.d \
&& BaseDeps=' \
git \
gcc \
autoconf \
bison \
build-essential \
libssl-dev \
libyaml-dev \
libreadline6-dev \
zlib1g-dev \
libncurses5-dev \
libffi-dev \
libgdbm6 \
libgdbm-dev \
make \
wget \
curl \
iproute2 \
net-tools \
tzdata \
locales \
ca-certificates \
' \
&& apt-get update \
&& DEBCONF_NOWARNINGS=yes apt-get -y upgrade \
&& DEBCONF_NOWARNINGS=yes DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $BaseDeps \
&& rm -rf /var/lib/apt/lists/* \
&& git clone https://github.com/sstephenson/ruby-build.git /opt/rbenv/plugins/ruby-build \
&& ruby-build ${RUBY_VERSION} /opt/ruby
CMD ["/bin/bash"]