Updated development Dockerfile and entrypoint per Gemini's recommendations

This commit is contained in:
Gregory Ballantine
2026-04-13 11:43:56 -04:00
parent b19c95187b
commit 3dbc11d294
2 changed files with 23 additions and 10 deletions

View File

@@ -1,16 +1,27 @@
FROM ruby:3.4
FROM ruby:3.4-slim
RUN gem install bundler
# 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
WORKDIR /usr/src/game-data
COPY Gemfile Gemfile.l*ck ./
# 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
RUN bundle check || bundle install
RUN gem install rake
# 3. Copy Gemfile first to leverage layer caching
COPY Gemfile Gemfile.lock ./
RUN bundle install
# 4. Copy the application code
COPY . ./
ENTRYPOINT ["bash", "entrypoints/dev.sh"]
# 5. Make sure your entrypoint script is executable
RUN chmod +x entrypoints/dev.sh
ENTRYPOINT ["bash", "entrypoints/dev.sh"]