eBooru/Dockerfile
Earlopain 87235d6e92
[Ruby] Update to 3.1
net-smtp is no longer bundled by default
Webrick is no longer bundled by default, new rails projects are created
with puma in the gemfile
2022-04-25 21:27:09 +02:00

31 lines
819 B
Docker

FROM ruby:3.1.2-alpine
# Dependencies for setup and runtime
RUN apk --no-cache add nodejs yarn postgresql-client ffmpeg vips tzdata \
git build-base postgresql-dev glib-dev bash
RUN wget -O - https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2 | tar -xj && \
cd jemalloc-5.2.1 && \
./configure && \
make && \
make install
RUN git config --global --add safe.directory /app
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so.2
# Install js packages and gems
COPY package.json yarn.lock ./
RUN yarn install
COPY Gemfile Gemfile.lock ./
RUN gem install bundler:2.3.12 && \
bundle install -j$(nproc)
# shoreman
RUN wget -O /usr/bin/shoreman https://github.com/chrismytton/shoreman/raw/master/shoreman.sh \
&& chmod +x /usr/bin/shoreman
WORKDIR /app
CMD [ "shoreman" ]