2024-05-30 20:33:19 -07:00
|
|
|
# syntax = docker/dockerfile:1
|
2023-10-15 16:47:24 -07:00
|
|
|
|
|
|
|
|
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile
|
2024-06-04 23:34:48 -07:00
|
|
|
ARG RUBY_VERSION=3.3.2
|
2024-05-30 20:33:19 -07:00
|
|
|
FROM docker.io/library/ruby:$RUBY_VERSION-slim as base
|
2023-10-15 16:47:24 -07:00
|
|
|
|
|
|
|
|
# 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 \
|
|
|
|
|
gnupg2 \
|
|
|
|
|
less \
|
|
|
|
|
git \
|
|
|
|
|
libpq-dev \
|
|
|
|
|
postgresql-client \
|
|
|
|
|
libvips \
|
2024-05-30 20:33:19 -07:00
|
|
|
curl \
|
|
|
|
|
libjemalloc2 \
|
|
|
|
|
pkg-config
|
2023-10-15 16:47:24 -07:00
|
|
|
|
|
|
|
|
ENV LANG=C.UTF-8 \
|
|
|
|
|
BUNDLE_JOBS=4 \
|
|
|
|
|
BUNDLE_RETRY=3
|
|
|
|
|
|
|
|
|
|
RUN gem update --system && gem install bundler
|
|
|
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["./bin/docker-entrypoint-development"]
|
|
|
|
|
|
|
|
|
|
EXPOSE 3000
|
|
|
|
|
|
2024-05-30 20:33:19 -07:00
|
|
|
CMD ["./bin/rails", "server"]
|