1919# but the database has *not* been loaded with a dump, and supporting files (drafts, charters, etc.)
2020# have *not* been downloaded.
2121
22- FROM debian:jessie
22+ FROM dyne/devuan:ascii
2323LABEL maintainer="Henrik Levkowetz <henrik@levkowetz.com>"
2424
2525# Default django runserver port
2626EXPOSE 8000
2727
2828# Run apt-get noninteractive
2929ENV DEBIAN_FRONTEND=noninteractive
30+ ENV DEVUAN_FRONTEND=noninteractive
3031
3132RUN apt-get update
3233RUN apt-get install -qy apt-transport-https
3334
34- # Use backports, updates, and security updates; over https if possible
35- RUN echo "deb https ://deb.debian .org/debian jessie main contrib non-free" > /etc/apt/sources.list
36- RUN echo "deb https ://deb.debian .org/debian jessie-backports main contrib non-free" >> /etc/apt/sources.list
37- RUN echo "deb https ://deb.debian .org/debian jessie -updates main contrib non-free" >> /etc/apt/sources.list
38- RUN echo "deb http://security.debian .org/debian-security jessie/updates main contrib non-free" >> /etc/apt/sources.list
35+ # Use backports, updates, and security updates
36+ RUN echo "deb http ://deb.devuan .org/merged ascii main contrib non-free" > /etc/apt/sources.list
37+ RUN echo "deb http ://deb.devuan .org/merged ascii-security main contrib non-free" >> /etc/apt/sources.list
38+ RUN echo "deb http ://deb.devuan .org/merged ascii -updates main contrib non-free" >> /etc/apt/sources.list
39+ RUN echo "deb http://deb.devuan .org/merged ascii-backports main contrib non-free" >> /etc/apt/sources.list
3940
4041# Install needed packages
4142#
@@ -44,27 +45,44 @@ RUN echo "deb http://security.debian.org/debian-security jessie/updates main con
4445# 15%, about 100MB.
4546
4647# Fetch apt package information, and upgrade to latest package versions
48+
4749RUN apt-get update
4850RUN apt-get -qy upgrade
4951
5052# Install the packages we need
5153RUN apt-get install -qy \
54+ build-essential \
5255 bzip2 \
5356 ca-certificates \
5457 colordiff \
5558 gawk \
5659 gcc \
5760 ipython \
61+ jq \
5862 less \
59- libfreetype6 \
60- libfontconfig \
63+ libbz2-dev \
64+ libdb5.3-dev \
65+ libexpat1-dev \
66+ libffi-dev \
67+ libgdbm-dev \
6168 libjpeg62-turbo-dev \
69+ liblzma-dev \
70+ libmagic1 \
71+ libmariadbclient-dev \
72+ libncurses5-dev \
73+ libncursesw5-dev \
74+ libreadline-dev \
75+ libsqlite3-dev \
76+ libssl-dev \
6277 libsvn1 \
6378 libxml2-dev \
6479 libxslt-dev \
6580 libz-dev \
6681 locales \
82+ make \
6783 man \
84+ mariadb-client \
85+ mariadb-server \
6886 openssh-client \
6987 patch \
7088 procps \
@@ -77,48 +95,27 @@ RUN apt-get install -qy \
7795 rsync \
7896 subversion \
7997 sudo \
98+ uuid-dev \
8099 vim \
81- wget
82-
83- # Install SystemV init
84- RUN apt-get install -qy sysvinit-core \
85- && cp /usr/share/sysvinit/inittab /etc/inittab
86-
87- # Get rid of systemd
88- RUN apt-get remove --yes --purge --auto-remove systemd \
89- && echo -e "\n Package: systemd\n Pin: release *\n Pin-Priority: -1\n " > /etc/apt/preferences.d/no-systemd
90-
91- # ------------------------------------------------------------------------------
92- # The following section is all about installing mysql server 5.6, instead of
93- # 5.5 which is provided in jessie. It's a bit convoluted.
94- # ------------------------------------------------------------------------------
95-
96- # Get the key used to sign the mysql repo
97- RUN gpg --keyserver pgp.mit.edu --recv-keys 5072E1F5
98- RUN gpg --export -a 5072E1F5 | apt-key add -
99-
100- # Install a package which will install apt sources entries for current mysql
101- RUN echo 'mysql-apt-config mysql-apt-config/select-server select mysql-5.6' | debconf-set-selections
102- RUN echo 'mysql-apt-config mysql-apt-config/repo-url string https://repo.mysql.com/apt/' | debconf-set-selections
103- RUN echo "deb https://repo.mysql.com/apt/debian/ jessie mysql-apt-config" >> /etc/apt/sources.list.d/mysql-apt-config.list
104- RUN apt-get update
105- RUN apt-get install -qy mysql-apt-config
106- RUN rm /etc/apt/sources.list.d/mysql-apt-config.list
100+ wget \
101+ xz-utils\
102+ zile \
103+ zlib1g-dev
107104
108105# Get the key used to sign the libyang repo
109106RUN wget -nv http://download.opensuse.org/repositories/home:liberouter/Debian_9.0/Release.key
110107RUN apt-key add - < Release.key
111108RUN rm Release.key
112109
113110# Add apt source entry for libyang
114- RUN echo "deb http://download.opensuse.org/repositories/home:/liberouter/Debian_8 .0/ /" >> /etc/apt/sources.list.d/libyang.list
111+ RUN echo "deb http://download.opensuse.org/repositories/home:/liberouter/Debian_9 .0/ /" >> /etc/apt/sources.list.d/libyang.list
115112
116113# Update the package defs, and install the desired mysql from the mysql repo
117114RUN apt-get update
118- RUN apt-get install -qy mysql-community-server libmysqlclient-dev libyang
115+ RUN apt-get install -qy libyang
119116
120117# This is expected to exist by the mysql startup scripts:
121- RUN touch /etc/mysql/debian.cnf
118+ # RUN touch /etc/mysql/debian.cnf
122119# ------------------------------------------------------------------------------
123120
124121# Get rid of installation files we don't need in the image, to reduce size
@@ -154,12 +151,29 @@ RUN ln -s /usr/local/phantomjs-1.9.8-linux-x86_64/bin/phantomjs .
154151ADD https://tools.ietf.org/tools/idnits/idnits /usr/local/bin/
155152RUN chmod +rx /usr/local/bin/idnits
156153
154+ # # Python 3
155+ ENV PYVER=3.6.9
156+ ENV PYREV=3.6
157+
158+ WORKDIR /usr/src
159+ RUN wget -q https://www.python.org/ftp/python/$PYVER/Python-$PYVER.tar.xz
160+ RUN tar xJf Python-$PYVER.tar.xz
161+ RUN rm Python-$PYVER.tar.xz
162+ WORKDIR /usr/src/Python-$PYVER/
163+ RUN ./configure
164+ RUN make
165+ RUN make altinstall
166+ WORKDIR /usr/src
167+ RUN rm -rf /usr/src/Python-$PYVER/
168+
169+ ENV HOSTNAME="datatracker"
170+
157171ENV DDIR="/usr/local/share/datatracker"
158172RUN mkdir -p $DDIR
159173WORKDIR $DDIR
160174
161- COPY requirements .txt ./
162- RUN pip --no-cache-dir install -r requirements .txt
175+ COPY requirements3 .txt ./
176+ RUN pip$PYREV --no-cache-dir install -r requirements3 .txt
163177
164178COPY settings_local.py ./
165179COPY setprompt ./
0 commit comments