35 lines
991 B
Docker
35 lines
991 B
Docker
# ----- Build Stage -----
|
|
# Using a specific Ruby version (e.g., 3.3) for stability
|
|
ARG RUBY_VERSION=3.3.1
|
|
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
|
|
|
|
RUN apt-get update -qq && \
|
|
apt-get install --no-install-recommends -y curl libjemalloc2 libvips tdsodbc freetds-dev build-essential libpq-dev libyaml-dev && \
|
|
rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
|
|
|
ENV LANG=C.UTF-8 \
|
|
BUNDLE_JOBS=4 \
|
|
BUNDLE_RETRY=3
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
RUN groupadd --system --gid 1000 rails && \
|
|
useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \
|
|
chown -R rails:rails /usr/src/app
|
|
USER 1000:1000
|
|
|
|
# COPY bin/development-entrypoint.sh /bin/development-entrypoint.sh
|
|
# RUN chown root:root bin/development-entrypoint.sh && chmod +x bin/development-entrypoint.sh
|
|
|
|
ENTRYPOINT ["./bin/docker-entrypoint"]
|
|
|
|
# ENTRYPOINT ["./bin/cron-entrypoint"]
|
|
|
|
|
|
# Expose the application port
|
|
EXPOSE 3005
|
|
|
|
# Set the default command to run the Rails server
|
|
CMD ["./bin/dev"]
|