Skip to content

Commit 4219315

Browse files
committed
Upgraded the Dockerfile to use debian:jessie as a base, and use mysql-server 5.6.
- Legacy-Id: 12567
1 parent 4d34be2 commit 4219315

1 file changed

Lines changed: 60 additions & 17 deletions

File tree

docker/Dockerfile

Lines changed: 60 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,51 @@
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:wheezy
22+
FROM debian:jessie
2323
MAINTAINER Henrik Levkowetz <henrik@levkowetz.com>
2424

2525
# Default django runserver port
2626
EXPOSE 8000
2727

28-
# Use backports
29-
RUN echo "deb http://http.debian.net/debian wheezy-backports main contrib non-free" >> /etc/apt/sources.list
30-
3128
# Run apt-get noninteractive
3229
ENV DEBIAN_FRONTEND=noninteractive
3330

31+
RUN apt-get update
32+
RUN apt-get install -qy apt-transport-https
33+
34+
# Use backports, updates, and security updates; all over https
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+
3439
# Install needed packages
3540
#
3641
# We're not including graphviz and ghostscript, needed for the 3 document
3742
# dependency graph tests; they would increase the size of the image by about
3843
# 15%, about 100MB.
39-
#
40-
RUN apt-get update && apt-get install -qy \
44+
45+
# Fetch apt package information, and upgrade to latest package versions
46+
RUN apt-get update
47+
RUN apt-get -qy upgrade
48+
49+
# Install the packages we need
50+
RUN apt-get install -qy \
4151
bzip2 \
4252
ca-certificates \
4353
colordiff \
4454
gawk \
55+
gcc \
4556
ipython \
4657
less \
4758
libfreetype6 \
4859
libfontconfig \
49-
libjpeg8-dev \
50-
libmysqlclient-dev \
51-
libsvn1/wheezy-backports \
60+
libjpeg62-turbo-dev \
61+
libsvn1 \
5262
libxml2-dev \
5363
libxslt-dev \
64+
libz-dev \
5465
locales \
5566
man \
56-
mysql-server \
5767
openssh-client \
5868
procps \
5969
pv \
@@ -63,12 +73,43 @@ RUN apt-get update && apt-get install -qy \
6373
python-subversion \
6474
realpath \
6575
rsync \
66-
subversion/wheezy-backports \
76+
subversion \
6777
sudo \
6878
vim \
69-
wget \
70-
&& apt-get clean \
71-
&& rm -rf /var/lib/apt/lists/*
79+
wget
80+
81+
# Install SystemV init
82+
RUN apt-get install -qy sysvinit-core \
83+
&& cp /usr/share/sysvinit/inittab /etc/inittab
84+
85+
# Get rid of systemd
86+
RUN apt-get remove --yes --purge --auto-remove systemd \
87+
&& echo -e "\nPackage: systemd\nPin: release *\nPin-Priority: -1\n" > /etc/apt/preferences.d/no-systemd
88+
89+
# ------------------------------------------------------------------------------
90+
# The following section is all about installing mysql server 5.6, instead of
91+
# 5.5 which is provided in jessie. It's a bit convoluted.
92+
# ------------------------------------------------------------------------------
93+
94+
# Get the key used to sign the mysql repo
95+
RUN gpg --keyserver pgp.mit.edu --recv-keys 8C718D3B5072E1F5
96+
RUN gpg --export -a 8C718D3B5072E1F5 | apt-key add -
97+
98+
# Install a package which will install apt sources entries for current mysql
99+
RUN echo 'mysql-apt-config mysql-apt-config/select-server select mysql-5.6' | debconf-set-selections
100+
RUN echo 'mysql-apt-config mysql-apt-config/repo-url string https://repo.mysql.com/apt/' | debconf-set-selections
101+
RUN echo "deb https://repo.mysql.com/apt/debian/ jessie mysql-apt-config" >> /etc/apt/sources.list.d/mysql-apt-config.list
102+
RUN apt-get update
103+
RUN apt-get install -qy mysql-apt-config
104+
RUN rm /etc/apt/sources.list.d/mysql-apt-config.list
105+
106+
# Update the package defs, and install the desired mysql from the mysql repo
107+
RUN apt-get update
108+
RUN apt-get install -qy mysql-community-server libmysqlclient-dev
109+
# ------------------------------------------------------------------------------
110+
111+
# Get rid of installation files we don't need in the image, to reduce size
112+
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
72113

73114
# Enable some common locales
74115
RUN sed -i -e 's/^. en_US/en_US/' -e 's/^. en_GB/en_GB/' -e 's/^. en_IE/en_IE/' /etc/locale.gen
@@ -89,13 +130,15 @@ RUN pip install virtualenv
89130

90131
# Phantomjs
91132
WORKDIR /usr/local
92-
RUN wget -q https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 \
93-
&& tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2
133+
134+
RUN wget -qN https://tools.ietf.org/tar/phantomjs-1.9.7-linux-x86_64.tar.bz2
135+
RUN tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2
136+
94137
WORKDIR /usr/local/bin
95138
RUN ln -s /usr/local/phantomjs-1.9.7-linux-x86_64/bin/phantomjs .
96139

97140
# idnits and dependencies
98-
RUN wget -q -P /usr/local/bin/ https://tools.ietf.org/tools/idnits/idnits && chmod +x /usr/local/bin/idnits
141+
RUN wget -q --no-check-certificate -P /usr/local/bin/ https://tools.ietf.org/tools/idnits/idnits && chmod +x /usr/local/bin/idnits
99142

100143
ENV DDIR="/usr/local/share/datatracker"
101144
RUN mkdir -p $DDIR

0 commit comments

Comments
 (0)