This repository was archived by the owner on Jun 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (42 loc) · 1.58 KB
/
Dockerfile
File metadata and controls
50 lines (42 loc) · 1.58 KB
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
FROM amazonlinux:2.0.20211001.0@sha256:28091ca56cd22253c7a5e99cb581dacee6678181208e2a7799d573bf25d51a63
ARG RUBY_VERSION
ARG NODEJS_VERSION=14
LABEL org.opencontainers.image.source https://github.com/rewindio/docker-amazonlinux2-ruby
LABEL maintainer "Rewind DevOps <devops@rewind.io>"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sL https://rpm.nodesource.com/setup_"${NODEJS_VERSION}".x | bash - && \
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo && \
# postgres
amazon-linux-extras install -y postgresql13 && \
yum install -y \
bzip2-1.* \
gcc-c++-7.* \
gdbm-devel-1.13* \
git-2.* \
libffi-devel-3.* \
libpq-devel.* \
libyaml-devel-0.* \
make-3* \
ncurses-devel-6.* \
nodejs-${NODEJS_VERSION}.* \
openssl-devel-1.0.2k-* \
readline-devel-6.2* \
tar-1.26* \
which-2.20* \
yarn-1.22* \
zip-3.0* \
zlib-devel-1.2.* && \
yum clean all && \
rm -rf /var/cache/yum && \
# rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv && \
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
ENV PATH=/root/.rbenv/bin:/root/.rbenv/plugins/ruby-build/bin:$PATH
RUN rbenv install ${RUBY_VERSION} && \
rbenv global ${RUBY_VERSION} && \
rbenv rehash && \
echo "eval $(rbenv init -)" >> ~/.bashrc && \
echo "eval $(rbenv init -)" >> ~/.profile
# Setting shim path due to non-interactive bash sessions not running rbenv init
ENV PATH=/root/.rbenv/shims:$PATH
RUN gem install bundler --version=2.1.4