2026-04-13 11:43:56 -04:00
|
|
|
FROM ruby:3.4-slim
|
2024-02-09 07:17:14 -05:00
|
|
|
|
2026-04-13 11:43:56 -04:00
|
|
|
# 1. Install essential build tools for gems like 'pg' or 'sqlite3'
|
|
|
|
|
RUN apt-get update -qq && apt-get install -y \
|
|
|
|
|
build-essential \
|
|
|
|
|
libpq-dev \
|
|
|
|
|
curl \
|
|
|
|
|
git
|
2024-02-09 07:17:14 -05:00
|
|
|
|
2025-07-23 23:24:49 -04:00
|
|
|
WORKDIR /usr/src/game-data
|
2024-02-09 07:17:14 -05:00
|
|
|
|
2026-04-13 11:43:56 -04:00
|
|
|
# 2. Set environment variables for the Gem volume we discussed
|
|
|
|
|
ENV BUNDLE_PATH=/usr/local/bundle \
|
|
|
|
|
BUNDLE_BIN=/usr/local/bundle/bin \
|
|
|
|
|
PATH=/usr/local/bundle/bin:$PATH
|
2024-02-09 07:17:14 -05:00
|
|
|
|
2026-04-13 11:43:56 -04:00
|
|
|
# 3. Copy Gemfile first to leverage layer caching
|
|
|
|
|
COPY Gemfile Gemfile.lock ./
|
|
|
|
|
RUN bundle install
|
2024-02-09 07:17:14 -05:00
|
|
|
|
2026-04-13 11:43:56 -04:00
|
|
|
# 4. Copy the application code
|
2024-02-09 07:17:14 -05:00
|
|
|
COPY . ./
|
|
|
|
|
|
2026-04-13 11:43:56 -04:00
|
|
|
# 5. Make sure your entrypoint script is executable
|
|
|
|
|
RUN chmod +x entrypoints/dev.sh
|
2025-07-23 23:24:49 -04:00
|
|
|
|
2026-04-13 11:43:56 -04:00
|
|
|
ENTRYPOINT ["bash", "entrypoints/dev.sh"]
|