-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathDockerfile.tendril
45 lines (39 loc) · 1.47 KB
/
Dockerfile.tendril
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
FROM ubuntu:xenial
RUN sed -i 's|deb-src|# deb-src|g' /etc/apt/sources.list && \
echo "mysql-server-5.5 mysql-server/root_password password root" | debconf-set-selections && \
echo "mysql-server-5.5 mysql-server/root_password_again password root" | debconf-set-selections && \
apt-get update && apt-get install -y --no-install-recommends \
tmux \
build-essential \
libfontconfig1 \
libsqlite3-dev \
libxslt1-dev \
nmap \
nikto \
openssh-server \
zlib1g-dev \
redis-tools \
ruby \
ruby-dev \
wget \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& adduser nepenthes --gecos "" --disabled-password
RUN cd /tmp && \
wget -O phantomjs.tar.bz2 \
https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
sha256sum phantomjs.tar.bz2 | grep -q 86dd9a4bf4aee45f1a84c9f61cf1947c1d6dce9b9e8d2a907105da7852460d2f && \
tar xjf phantomjs.tar.bz2 && \
cp phantomjs-*/bin/phantomjs /bin/
# Install these before we copy all the files so we don't have to re-install all
# the gems/npm packages if just other files change.
COPY Gemfile /home/nepenthes/
RUN cd /home/nepenthes && \
gem install --no-rdoc --no-ri bundler && \
bundle install --without local
COPY . /home/nepenthes
RUN cd /home/nepenthes && \
cp config/database.yml.example config/database.yml && \
chmod 0777 log && \
cp config/auth.yml.example config/auth.yml
USER nepenthes
ENTRYPOINT ["/home/nepenthes/script/docker-nepenthes-worker.sh"]