forked from beercan1989/docker-arm-mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (29 loc) · 1.15 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
FROM arm32v7/ubuntu:xenial
MAINTAINER James Bacon [email protected]
USER root
## Create mysql user early to keep UID/GUID consistent
RUN groupadd -r mysql && useradd -r -g mysql mysql
## Set the mysql version to install
ENV MYSQL_MAJOR 5.7
## Upload MySQL install script
COPY install-mysql.bash /opt/docker-arm-mysql/
## Install MySQL
RUN /opt/docker-arm-mysql/install-mysql.bash
## Upload MySQL configuration for docker script
COPY configure-mysql-for-docker.bash /opt/docker-arm-mysql/
## Run MySQL configuration for docker script
RUN /opt/docker-arm-mysql/configure-mysql-for-docker.bash
## Upload script to initialise MySQL
COPY initialise-mysql-insecure.bash /opt/docker-arm-mysql/
## Run script to initialize MySQL
RUN /opt/docker-arm-mysql/initialise-mysql-insecure.bash
## Setup MySQL data directory as a volume
VOLUME /var/lib/mysql
## Upload docker entrypoint script
COPY docker-entrypoint.sh /opt/docker-arm-mysql/
## Set the entrypoint script, used to configure depending on requirements.
ENTRYPOINT ["/opt/docker-arm-mysql/docker-entrypoint.sh"]
## Expose the MySQL port
EXPOSE 3306
## Set the default command to be the MySQL daemon
CMD ["mysqld"]