-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile
31 lines (22 loc) · 820 Bytes
/
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
FROM ubuntu:latest
MAINTAINER Nane Kratzke
# Install latest updates
RUN apt-get update
RUN apt-get upgrade -y
# Install mysql client and server
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server curl
# Enable remote access (default is localhost only, we change this
# otherwise our database would not be reachable from outside the container)
RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
# Install database
ADD ./database.sql /var/db/database.sql
# Set Standard settings
ENV user student
ENV password secret
ENV url file:/var/db/database.sql
ENV right READ
# Install starting script
ADD ./start-database.sh /usr/local/bin/start-database.sh
RUN chmod +x /usr/local/bin/start-database.sh
EXPOSE 3306
CMD ["/usr/local/bin/start-database.sh"]