-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
38 lines (31 loc) · 1.19 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
FROM ruby:2.7
RUN mkdir -p /opt/congress_forms_api
WORKDIR /opt/congress_forms_api
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
gnupg \
apt-transport-https \
libpq-dev \
postgresql-client \
libsqlite3-dev && \
curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
apt-get update && \
apt-get install -y --no-install-recommends google-chrome-stable
COPY Gemfile* ./
RUN bundle install
COPY . .
RUN adduser --uid 1000 app && \
chown -R app /opt/congress_forms_api/tmp && \
chown -R app /opt/congress_forms_api/log && \
chown -R app /opt/congress_forms_api/public/screenshots && \
mkdir -p /opt/congress_forms_api/contact_congress && \
chown -R app /opt/congress_forms_api/contact_congress && \
mkdir /opt/congress_forms_api/.webdrivers && \
chown -R app /opt/congress_forms_api/.webdrivers
USER app
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]
ENTRYPOINT ["/opt/congress_forms_api/entrypoint.sh"]