Skip to content

Commit 288abb1

Browse files
committed
Add Ruby 2.6, 3.3, and 3.4 onboarding containers
1 parent 050c8c0 commit 288abb1

File tree

8 files changed

+241
-0
lines changed

8 files changed

+241
-0
lines changed

utils/build/virtual_machine/weblogs/ruby/provision_test-app-ruby-multialpine.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ weblog:
1010
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/docker-compose.yml
1111
- name: copy-ruby-app
1212
local_path: lib-injection/build/docker/ruby
13+
- name: copy-ruby3_4-app-dockerfile
14+
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_4-alpine
15+
- name: copy-ruby3_3-app-dockerfile
16+
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_3-alpine
1317
- name: copy-ruby3_2-app-dockerfile
1418
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_2-alpine
1519
- name: copy-ruby3_1-app-dockerfile
@@ -18,6 +22,8 @@ weblog:
1822
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_3_0-alpine
1923
- name: copy-ruby2_7-app-dockerfile
2024
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_2_7-alpine
25+
- name: copy-ruby2_6-app-dockerfile
26+
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.ruby_2_6-alpine
2127
- name: copy-reverseproxy-dockerfile
2228
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multialpine/Dockerfile.reverseproxy
2329
- name: copy-reverseproxy-conf

utils/build/virtual_machine/weblogs/ruby/provision_test-app-ruby-multicontainer.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ weblog:
1010
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/docker-compose.yml
1111
- name: copy-ruby-app
1212
local_path: lib-injection/build/docker/ruby
13+
- name: copy-ruby3_4-app-dockerfile
14+
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_4
15+
- name: copy-ruby3_3-app-dockerfile
16+
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_3
1317
- name: copy-ruby3_2-app-dockerfile
1418
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_2
1519
- name: copy-ruby3_1-app-dockerfile
@@ -18,6 +22,8 @@ weblog:
1822
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_3_0
1923
- name: copy-ruby2_7-app-dockerfile
2024
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_2_7
25+
- name: copy-ruby2_6-app-dockerfile
26+
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.ruby_2_6
2127
- name: copy-reverseproxy-dockerfile
2228
local_path: utils/build/virtual_machine/weblogs/ruby/test-app-ruby-multicontainer/Dockerfile.reverseproxy
2329
- name: copy-reverseproxy-conf
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM public.ecr.aws/docker/library/ruby:2.6-alpine
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
# Set timezone to UTC by default
6+
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
7+
8+
# Upgrade RubyGems and Bundler
9+
RUN gem update --system 3.4.22
10+
RUN gem install bundler -v '~> 2.4.22'
11+
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
12+
ENV BUNDLE_SILENCE_ROOT_WARNING 1
13+
14+
# Setup directory
15+
RUN mkdir /app
16+
WORKDIR /app
17+
18+
# Add files
19+
COPY lib_injection_rails_app /app
20+
21+
# Install gems
22+
RUN bundle install
23+
24+
# Set entrypoint
25+
ENTRYPOINT ["/bin/bash", "-c"]
26+
27+
CMD ["bin/rails server -b 0.0.0.0 -p 18080"]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM public.ecr.aws/docker/library/ruby:3.3-alpine
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
# Set timezone to UTC by default
6+
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
7+
8+
# Upgrade RubyGems and Bundler
9+
RUN gem update --system 3.4.22
10+
RUN gem install bundler -v '~> 2.4.22'
11+
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
12+
ENV BUNDLE_SILENCE_ROOT_WARNING 1
13+
14+
# Setup directory
15+
RUN mkdir /app
16+
WORKDIR /app
17+
18+
# Add files
19+
COPY lib_injection_rails_app /app
20+
21+
# Install gems
22+
RUN bundle install
23+
24+
# Set entrypoint
25+
ENTRYPOINT ["/bin/bash", "-c"]
26+
27+
CMD ["bin/rails server -b 0.0.0.0 -p 18080"]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM public.ecr.aws/docker/library/ruby:3.4-alpine
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
# Set timezone to UTC by default
6+
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
7+
8+
# Upgrade RubyGems and Bundler
9+
RUN gem update --system 3.4.22
10+
RUN gem install bundler -v '~> 2.4.22'
11+
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
12+
ENV BUNDLE_SILENCE_ROOT_WARNING 1
13+
14+
# Setup directory
15+
RUN mkdir /app
16+
WORKDIR /app
17+
18+
# Add files
19+
COPY lib_injection_rails_app /app
20+
21+
# Install gems
22+
RUN bundle install
23+
24+
# Set entrypoint
25+
ENTRYPOINT ["/bin/bash", "-c"]
26+
27+
CMD ["bin/rails server -b 0.0.0.0 -p 18080"]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM public.ecr.aws/docker/library/ruby:2.6
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
# Install prerequisites
6+
RUN set -ex && \
7+
echo "===> Installing dependencies" && \
8+
apt-get -y update && \
9+
apt-get install -y --force-yes --no-install-recommends \
10+
curl wget tar gzip gnupg apt-transport-https ca-certificates tzdata locales && \
11+
\
12+
echo "===> Installing database libraries" && \
13+
apt-get install -y --force-yes --no-install-recommends sqlite3 && \
14+
\
15+
echo "===> Installing dev tools" && \
16+
mkdir -p /usr/share/man/man1 && \
17+
apt-get install -y --force-yes --no-install-recommends \
18+
sudo git openssh-client rsync vim \
19+
net-tools netcat-traditional parallel unzip zip bzip2 && \
20+
\
21+
echo "===> Cleaning up" && \
22+
rm -rf /var/lib/apt/lists/*;
23+
24+
# Set timezone to UTC by default
25+
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
26+
27+
# Upgrade RubyGems and Bundler
28+
RUN gem update --system 3.4.22
29+
RUN gem install bundler -v '~> 2.4.22'
30+
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
31+
ENV BUNDLE_SILENCE_ROOT_WARNING 1
32+
33+
# Setup directory
34+
RUN mkdir /app
35+
WORKDIR /app
36+
37+
# Add files
38+
COPY lib_injection_rails_app /app
39+
40+
# Install gems
41+
RUN bundle install
42+
43+
# Set entrypoint
44+
ENTRYPOINT ["/bin/bash", "-c"]
45+
46+
CMD ["bin/rails server -b 0.0.0.0 -p 18080"]
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
FROM public.ecr.aws/docker/library/ruby:3.3
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
# Install prerequisites
6+
RUN set -ex && \
7+
echo "===> Installing dependencies" && \
8+
apt-get -y update && \
9+
apt-get install -y --force-yes --no-install-recommends \
10+
curl wget tar gzip gnupg apt-transport-https ca-certificates tzdata locales && \
11+
\
12+
echo "===> Installing database libraries" && \
13+
apt-get install -y --force-yes --no-install-recommends sqlite3 && \
14+
\
15+
echo "===> Installing dev tools" && \
16+
mkdir -p /usr/share/man/man1 && \
17+
apt-get install -y --force-yes --no-install-recommends \
18+
sudo git openssh-client rsync vim \
19+
net-tools netcat-traditional parallel unzip zip bzip2 && \
20+
\
21+
echo "===> Cleaning up" && \
22+
rm -rf /var/lib/apt/lists/*;
23+
24+
# Set timezone to UTC by default
25+
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
26+
27+
# Upgrade RubyGems and Bundler
28+
RUN gem update --system 3.4.22
29+
RUN gem install bundler -v '~> 2.4.22'
30+
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
31+
ENV BUNDLE_SILENCE_ROOT_WARNING 1
32+
33+
# Setup directory
34+
RUN mkdir /app
35+
WORKDIR /app
36+
37+
# Add files
38+
COPY lib_injection_rails_app /app
39+
40+
# Replace the incompatible bigdecimal version constraint
41+
RUN sed -i "s|gem 'bigdecimal', '~> 1.2', '>= 1.2.7'|gem 'bigdecimal', '>= 3.1.0'|" Gemfile
42+
# Add/replace nio4r constraint
43+
RUN grep -q "gem 'nio4r'" Gemfile || echo "gem 'nio4r', '>= 2.5.9'" >> Gemfile
44+
45+
# Install gems
46+
RUN bundle install
47+
48+
# Set entrypoint
49+
ENTRYPOINT ["/bin/bash", "-c"]
50+
51+
CMD ["bin/rails server -b 0.0.0.0 -p 18080"]
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
FROM public.ecr.aws/docker/library/ruby:3.4
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
# Install prerequisites
6+
RUN set -ex && \
7+
echo "===> Installing dependencies" && \
8+
apt-get -y update && \
9+
apt-get install -y --force-yes --no-install-recommends \
10+
curl wget tar gzip gnupg apt-transport-https ca-certificates tzdata locales && \
11+
\
12+
echo "===> Installing database libraries" && \
13+
apt-get install -y --force-yes --no-install-recommends sqlite3 && \
14+
\
15+
echo "===> Installing dev tools" && \
16+
mkdir -p /usr/share/man/man1 && \
17+
apt-get install -y --force-yes --no-install-recommends \
18+
sudo git openssh-client rsync vim \
19+
net-tools netcat-traditional parallel unzip zip bzip2 && \
20+
\
21+
echo "===> Cleaning up" && \
22+
rm -rf /var/lib/apt/lists/*;
23+
24+
# Set timezone to UTC by default
25+
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
26+
27+
# Upgrade RubyGems and Bundler
28+
RUN gem update --system 3.4.22
29+
RUN gem install bundler -v '~> 2.4.22'
30+
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
31+
ENV BUNDLE_SILENCE_ROOT_WARNING 1
32+
33+
# Setup directory
34+
RUN mkdir /app
35+
WORKDIR /app
36+
37+
# Add files
38+
COPY lib_injection_rails_app /app
39+
40+
# Replace the incompatible bigdecimal version constraint
41+
RUN sed -i "s|gem 'bigdecimal', '~> 1.2', '>= 1.2.7'|gem 'bigdecimal', '>= 3.1.0'|" Gemfile
42+
# Add/replace nio4r constraint
43+
RUN grep -q "gem 'nio4r'" Gemfile || echo "gem 'nio4r', '>= 2.5.9'" >> Gemfile
44+
45+
# Install gems
46+
RUN bundle install
47+
48+
# Set entrypoint
49+
ENTRYPOINT ["/bin/bash", "-c"]
50+
51+
CMD ["bin/rails server -b 0.0.0.0 -p 18080"]

0 commit comments

Comments
 (0)