forked from RockefellerArchiveCenter/aurora
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (43 loc) · 1.54 KB
/
Dockerfile
File metadata and controls
55 lines (43 loc) · 1.54 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM python:3.6
ENV PYTHONUNBUFFERED 1
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install sudo \
apt-utils \
clamav-daemon \
clamav-freshclam \
default-libmysqlclient-dev \
python-dev \
python-pip \
ssh \
vim \
wget \
rsync \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Copy and make Aurora scripts
COPY scripts/RAC* /usr/local/bin/
COPY import_sample_data.sh /usr/local/bin/import_sample_data
RUN chmod +x /usr/local/bin/RAC* && chmod +x /usr/local/bin/import_sample_data
# Setup SSH
RUN sed -i 's/Port 22/Port 12060/gi' /etc/ssh/sshd_config
RUN sed -i 's/systemctl restart sshd2.service/service ssh restart/gi' /usr/local/bin/RACaddorg
# Update clamav databases
RUN wget -O /var/lib/clamav/main.cvd http://database.clamav.net/main.cvd && \
wget -O /var/lib/clamav/daily.cvd http://database.clamav.net/daily.cvd && \
wget -O /var/lib/clamav/bytecode.cvd http://database.clamav.net/bytecode.cvd && \
chown clamav:clamav /var/lib/clamav/*.cvd
# Permissions for clamav
RUN mkdir /var/run/clamav && \
chown clamav:clamav /var/run/clamav && \
chmod 750 /var/run/clamav
# Run clamav as root
RUN sed -i 's/^User .*$/User root/g' /etc/clamav/clamd.conf
RUN sed -i 's/^DatabaseOwner .*$/DatabaseOwner root/g' /etc/clamav/freshclam.conf
# Copy Aurora application files
RUN mkdir -p /code/
COPY . /code
RUN mkdir -p /data/
# Install Python modules
RUN pip install --upgrade pip && pip install -r /code/requirements.txt
EXPOSE 8000 3310
WORKDIR /code/aurora