prod pruning
This commit is contained in:
+21
-68
@@ -1,83 +1,26 @@
|
||||
# syntax = docker/dockerfile:1
|
||||
# ----- Build Stage -----
|
||||
# Using a specific Ruby version (e.g., 3.3) for stability
|
||||
ARG RUBY_VERSION=3.4.8
|
||||
FROM docker.io/library/ruby:3.4.8-slim as base
|
||||
|
||||
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
|
||||
ARG RUBY_VERSION=3.3.9
|
||||
FROM docker.io/library/ruby:$RUBY_VERSION-slim as base
|
||||
|
||||
# OS Level Dependencies
|
||||
# Install production system dependencies
|
||||
RUN --mount=type=cache,target=/var/cache/apt \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
--mount=type=tmpfs,target=/var/log \
|
||||
rm -f /etc/apt/apt.conf.d/docker-clean; \
|
||||
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache; \
|
||||
apt-get update -qq \
|
||||
&& apt-get install -yq --no-install-recommends \
|
||||
build-essential \
|
||||
cmake \
|
||||
ruby-dev \
|
||||
gnupg2 \
|
||||
less \
|
||||
git \
|
||||
unixodbc \
|
||||
unixodbc-dev \
|
||||
cron \
|
||||
curl \
|
||||
dos2unix \
|
||||
tdsodbc \
|
||||
freetds-dev \
|
||||
libvips \
|
||||
libpq-dev \
|
||||
curl \
|
||||
libjemalloc2 \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
wget \
|
||||
libtool \
|
||||
libssl-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG WATCHMAN_VERSION=v2025.11.10.00
|
||||
WORKDIR /tmp
|
||||
RUN git clone https://github.com/facebook/watchman.git -b ${WATCHMAN_VERSION} --depth 1 && \
|
||||
cd watchman && \
|
||||
./autogen.sh && \
|
||||
./configure && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
# Download and install Watchman from the pre-compiled binary
|
||||
# RUN curl -L https://github.com/facebook/watchman/archive/refs/tags/v${WATCHMAN_VERSION}.zip -o watchman.zip \
|
||||
# && unzip watchman.zip \
|
||||
# && rm watchman.zip \
|
||||
# && cd watchman-${WATCHMAN_VERSION} \
|
||||
# && mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman \
|
||||
# && chmod 755 /usr/local/bin/watchman \
|
||||
# && chmod 2777 /usr/local/var/run/watchman \
|
||||
# && cd .. \
|
||||
# && rm -fr ${WATCHMAN_VERSION}
|
||||
|
||||
# OS Level Dependencies
|
||||
# RUN --mount=type=cache,target=/var/cache/apt \
|
||||
# --mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
# --mount=type=tmpfs,target=/var/log \
|
||||
# rm -f /etc/apt/apt.conf.d/docker-clean; \
|
||||
# echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache; \
|
||||
# apt-get update -qq \
|
||||
# && apt-get install -yq --no-install-recommends \
|
||||
# build-essential \
|
||||
# ruby-dev \
|
||||
# gnupg2 \
|
||||
# less \
|
||||
# git \
|
||||
# unixodbc \
|
||||
# unixodbc-dev \
|
||||
# tdsodbc \
|
||||
# freetds-dev \
|
||||
# libvips \
|
||||
# libpq-dev \
|
||||
# curl \
|
||||
# libjemalloc2 \
|
||||
# pkg-config \
|
||||
# libtool \
|
||||
# libssl-dev && \
|
||||
# rm -rf /var/lib/apt/lists/*
|
||||
libyaml-dev
|
||||
|
||||
ENV LANG=C.UTF-8 \
|
||||
BUNDLE_JOBS=4 \
|
||||
@@ -85,8 +28,18 @@ ENV LANG=C.UTF-8 \
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
ENTRYPOINT ["./bin/docker-entrypoint-development"]
|
||||
RUN gem install foreman
|
||||
|
||||
# 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/development-entrypoint"]
|
||||
|
||||
# ENTRYPOINT ["./bin/cron-entrypoint"]
|
||||
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 3002
|
||||
|
||||
CMD ["./bin/rails", "server"]
|
||||
# Set the default command to run the Rails server
|
||||
CMD ["./bin/dev"]
|
||||
|
||||
Reference in New Issue
Block a user