-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
54 lines (44 loc) · 1.38 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
#
# Copy/dervied from code held at https://github.com/Tommi2Day/mysql4
#
FROM ubuntu:12.04
LABEL maintainer="[email protected]"
#env
ENV DEBIAN_FRONTEND noninteractive
ENV HOSTNAME mysql4
ENV TZ Europe/London
ENV TERM linux
ENV PATH /usr/local/mysql/bin:$PATH
ENV ENSEMBL_CONTAINER='true'
RUN sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -q -y build-essential libncurses5-dev bison less vim python3
#locale
RUN locale-gen en_GB.UTF-8 && locale-gen en_US.UTF-8 && dpkg-reconfigure locales
#Time
RUN echo "$TZ" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata
#add mysql user and sources
RUN groupadd -r mysql && useradd -r -g mysql mysql
#compile mysql4 from source
COPY compile_mysql4.sh mysql-4.1.25.tar.gz /root/
RUN chmod +x /root/compile_mysql4.sh
RUN /root/compile_mysql4.sh
#add entrypoint but under /additional
RUN mkdir /additional
RUN chmod ugo+rx /additional
COPY start.sh stop_mysql.sh /additional/
RUN chmod ugo+x /additional/*.sh
#interfaces
EXPOSE 3306
VOLUME /db
VOLUME /flatfiles
# Add Ensembl scripts
COPY ensembl_databases.py /bin/.
RUN chmod ugo+x /bin/ensembl_databases.py
COPY load_mysql.sh /bin/.
RUN chmod ugo+x /bin/load_mysql.sh
COPY dblookup.json /etc/.
ENV ENSEMBL_DBLOOKUP /etc/dblookup.json
#define entrypoint
ENTRYPOINT ["/additional/start.sh"]
CMD ["mysqld_safe"]