-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.dev
More file actions
29 lines (22 loc) · 865 Bytes
/
Dockerfile.dev
File metadata and controls
29 lines (22 loc) · 865 Bytes
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
FROM ruby:4.0.0-slim
ENV APP_HOME="/app_home"
ENV BUNDLE_PATH="${APP_HOME}/vendor/bundle"
ENV PATH="${APP_HOME}/bin:${BUNDLE_PATH}/bin:${PATH}"
WORKDIR $APP_HOME
ARG UID=1000
ARG GID=1000
# Install Chromium and ChromeDriver for system tests
RUN apt-get update && apt-get install -y \
chromium \
chromium-driver \
&& rm -rf /var/lib/apt/lists/*
RUN bash -c "set -o pipefail && apt-get update \
&& apt-get install -y --no-install-recommends build-essential curl git libpq-dev libyaml-dev libvips vim\
&& rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man \
&& apt-get clean \
&& groupadd -g \"${GID}\" ruby \
&& useradd --create-home --no-log-init -u \"${UID}\" -g \"${GID}\" ruby \
&& chown ruby:ruby -R /app_home"
EXPOSE 3000
ENTRYPOINT ["./bin/dev-entrypoint"]
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]