-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 705 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (23 loc) · 705 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
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true
FROM ruby:3.3
# Install system dependencies
RUN apt-get update -qq && \
apt-get install -y build-essential && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Install bundler
RUN gem install bundler
# Copy Gemfile and gemspec first for better layer caching
COPY Gemfile magic_query.gemspec ./
# Copy Gemfile.lock if it exists (required for consistent builds)
# If it doesn't exist, generate it first with: bundle install
COPY Gemfile.lock ./
# Copy lib directory (required by gemspec for version file)
COPY lib/ ./lib/
# Install dependencies
RUN bundle install
# Copy the rest of the application
COPY . .
# Default command
CMD ["bash"]