-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
34 lines (27 loc) · 1.1 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
FROM ruby:3.0.4-alpine3.16
ENV CHROME_BIN=/usr/bin/chromium-browser \
CHROME_PATH=/usr/lib/chromium/ \
SEXY_SETTINGS_DELIMITER=";" \
CHROME_ARGS="window-size=1920x1080, disable-gpu, no-sandbox, disable-dev-shm-usage, disable-software-rasterizer"
RUN apk update && apk upgrade --no-cache --available \
&& apk add --no-cache \
chromium firefox \
chromium-chromedriver \
ttf-freefont \
font-noto-emoji \
build-base bash \
curl \
git \
less dbus \
&& apk add --no-cache \
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing font-wqy-zenhei \
&& wget https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz \
&& tar -zxf geckodriver-v0.31.0-linux64.tar.gz -C /usr/bin \
&& dbus-daemon --system
RUN adduser -D howitzer-user
USER howitzer-user
WORKDIR /home/howitzer_example
COPY --chown=howitzer-user Gemfile Gemfile.lock /home/howitzer_example/
RUN bundle config --global frozen 1 && bundle install --jobs=3 --retry=3
COPY --chown=howitzer-user . ./
ENTRYPOINT ["sleep", "infinity"]