forked from JSONAPI-Resources/jsonapi-resources
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.ruby3.1
More file actions
24 lines (18 loc) · 821 Bytes
/
Dockerfile.ruby3.1
File metadata and controls
24 lines (18 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Dockerfile for testing jsonapi-resources with Rails 6.1-8.1 (Ruby 3.1.5)
FROM ruby:3.1.5
# Install dependencies
RUN apt-get update -qq && \
apt-get install -y build-essential libpq-dev default-libmysqlclient-dev nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy Gemfile and gemspec
COPY Gemfile jsonapi-resources.gemspec ./
COPY lib/jsonapi/resources/version.rb ./lib/jsonapi/resources/
# Install specific bundler version for compatibility
RUN gem install bundler -v 2.4.14 --no-document && \
gem install bundler -v 2.4.14 --install-dir /usr/local/bundle --no-document && \
bundle --version
# Note: bundle install will happen at runtime with specific RAILS_VERSION
# This allows testing multiple Rails versions without rebuilding the image