-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
40 lines (31 loc) · 1.83 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM docker.io/library/ruby:3.3.5-bookworm
LABEL maintainer="[email protected]"
ARG RAILS_ENV=$RAILS_ENV
RUN apt-get update && apt-get upgrade -y && apt-get -y --no-install-recommends install \
build-essential coreutils curl git grep gzip postgresql-client rclone rsync sqlite3 unzip zip zstd brotli imagemagick redis-tools \
nodejs npm \
libmagickwand-dev libpq-dev libsqlite3-dev libpng-dev libsodium-dev libmariadbd-dev
# maticore
RUN curl "https://repo.manticoresearch.com/manticore-repo.noarch.deb" > /tmp/manticore-repo.noarch.deb && dpkg -i /tmp/manticore-repo.noarch.deb && apt-get update
RUN apt-get -y install manticore || apt-get -y install manticore
# firefox-esr, chromium
RUN if [ $RAILS_ENV = "development" ]; then \
apt-get -y --no-install-recommends install firefox-esr chromium; fi
# install firefox-beta, geckodriver
RUN if [ $RAILS_ENV = "development" ]; then \
curl "https://packages.mozilla.org/apt/repo-signing-key.gpg" -o /etc/apt/keyrings/packages.mozilla.org.asc \
&& gpg --show-key /etc/apt/keyrings/packages.mozilla.org.asc \
&& echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee /etc/apt/sources.list.d/mozilla.list \
&& apt-get update && apt-get install -y firefox-beta \
&& curl -L "https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz" > /tmp/geckodriver-v0.34.0-linux64.tar.gz \
&& echo '79b2e77edd02c0ec890395140d7cdc04a7ff0ec64503e62a0b74f88674ef1313 /tmp/geckodriver-v0.34.0-linux64.tar.gz' | sha256sum --check \
&& tar xzf /tmp/geckodriver-v0.34.0-linux64.tar.gz -C /usr/local/bin \
; fi
RUN gem update --system
WORKDIR /littlesis
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY package.json package-lock.json ./
RUN npm install
EXPOSE 8080
CMD bundle exec puma