-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
28 lines (25 loc) · 927 Bytes
/
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
FROM ruby:2.7.3
RUN apt-get update -qq && apt-get install -y postgresql-client curl clamav clamav-daemon
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash
RUN apt-get install nodejs
RUN mkdir /opencell
WORKDIR /opencell
COPY Gemfile /opencell/Gemfile
COPY Gemfile.lock /opencell/Gemfile.lock
COPY package.json /opencell/package.json
RUN bundle install --jobs 20 --retry 5
RUN npm install
COPY . /opencell
# Add a script to be executed every time the container starts.
RUN mkdir /var/run/clamav && \
chown clamav:clamav /var/run/clamav && \
chmod 750 /var/run/clamav && \
sed -i 's/User clamav/User root/g' /etc/clamav/clamd.conf && \
sed -i 's/DatabaseOwner clamav/DatabaseOwner root/g' /etc/clamav/freshclam.conf
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
RUN freshclam
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000
# Start the main process.
CMD ["rails", "server", "-b", "0.0.0.0"]