-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-ruby-2.7.0
65 lines (57 loc) · 1.6 KB
/
Dockerfile-ruby-2.7.0
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM debian:bullseye
SHELL ["/bin/bash","-l","-c"]
# Install dependencies
RUN apt-get update
RUN apt-get install -y \
nodejs \
ghostscript \
shared-mime-info \
openssl \
curl \
gnupg2 \
dirmngr \
git-core \
libcurl4-openssl-dev \
software-properties-common \
zlib1g-dev \
build-essential \
libssl-dev \
libreadline-dev \
libyaml-dev \
libsqlite3-dev \
sqlite3 \
libxml2-dev \
libxslt1-dev \
libffi-dev \
libpq-dev \
libmagickcore-6.q16-dev \
libxml2-dev \
libxslt-dev \
unixodbc \
unixodbc-dev \
freetds-dev \
freetds-bin \
tdsodbc \
locales \
locales-all \
nano
# Install Nodejs from source
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install nodejs -y
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
# Install yarn from source
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update -y
RUN apt-get install yarn -y
# Install rbenv & ruby-build
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv
RUN echo 'export PATH="~/.rbenv/bin:$PATH"' >> ~/.bashrc
RUN echo 'eval "$(rbenv init -)"' >> ~/.bashrc
RUN git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
RUN echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
RUN echo 'export PATH="$PATH:/usr/bin:/usr/local/bin/"' >> ~/.bash_rc
RUN echo 'export RUBYOPT='-W:no-deprecated'' >> ~/.bash_rc
# Install ruby
RUN rbenv rehash
RUN rbenv install 2.7.0
RUN rbenv global 2.7.0