forked from cybsafe/phishtray
-
Notifications
You must be signed in to change notification settings - Fork 1
/
local.Dockerfile
55 lines (45 loc) · 1.81 KB
/
local.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM centos:7
# SSH
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME [ "/sys/fs/cgroup" ]
RUN yum -y install openssh-server openssh-clients
RUN echo root:pass | chpasswd
CMD ["/usr/sbin/sshd", "-D"]
# Upodate OS (IUP - Inline with Upstream Stable)
# more info here - https://ius.io/
RUN yum -y install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum -y clean all
# Install Python 3 and OS dependencies
RUN yum -y install \
gcc \
wget \
python36u \
python36u-pip \
python36u-devel \
mariadb-devel \
mariadb-server \
&& yum -y clean all
# Download and install dockerize.
# Needed so the web container will wait for MySQL to start.
ENV DOCKERIZE_VERSION v0.4.0
RUN wget --no-verbose https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
# Set PYTHONUNBUFFERED so output is displayed in the Docker log
ENV PYTHONUNBUFFERED=1
# Add aliases
RUN echo "alias py3='python3.6'" >> ~/.bashrc
# PIP Requirements
COPY requirements*.txt ./
RUN pip3.6 install --upgrade pip
RUN pip3.6 install --upgrade setuptools
RUN pip3.6 install -r requirements.txt && pip3.6 install -r requirements-dev.txt
WORKDIR /usr/src/app