-
Notifications
You must be signed in to change notification settings - Fork 119
/
Dockerfile
55 lines (43 loc) · 1.47 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright (C) 2016 Bitergia
# GPLv3 License
FROM debian:8
MAINTAINER Luis Cañas-Díaz <lcanas@bitergia.com>
ENV DEBIAN_FRONTEND noninteractive
ENV DEPLOY_USER bitergia
ENV DEPLOY_USER_DIR /home/${DEPLOY_USER}
ENV SCRIPTS_DIR ${DEPLOY_USER_DIR}/scripts
# Initial user
RUN useradd bitergia --create-home --shell /bin/bash
# install dependencies
RUN apt-get update && \
apt-get -y install --no-install-recommends \
bash locales \
git git-core \
tree ccze \
psmisc \
python python3 pep8 \
python3-dateutil python3-bs4 \
python3-pip python3-dev python3-redis python3-sqlalchemy \
python3-flask \
python3-pandas \
python-mysqldb \
python3-cherrypy3 \
gcc make libmysqlclient-dev mariadb-client \
unzip curl wget sudo ssh\
&& \
apt-get clean && \
find /var/lib/apt/lists -type f -delete
# Not available as package in Debian 8 python3-myssqldb
RUN pip3 install mysqlclient
# perceval needs a newer version than Debian 8 - this breaks pip3
RUN pip3 install requests
# sortinghat needs pandas
# RUN pip3 install pandas # it crashes so we use the .deb
RUN echo "${DEPLOY_USER} ALL=NOPASSWD: ALL" >> /etc/sudoers
RUN mkdir -p /home/bitergia/logs ; chown -R bitergia:bitergia /home/bitergia/logs
VOLUME ["/home/bitergia/logs"]
ADD stage ${DEPLOY_USER_DIR}/stage
RUN chmod 755 ${DEPLOY_USER_DIR}/stage
USER ${DEPLOY_USER}
WORKDIR ${DEPLOY_USER_DIR}
CMD ${DEPLOY_USER_DIR}/stage