Blame view

commons/mysql/5.5/Dockerfile 925 Bytes
036fad96   João Vitor Rebouças   Adicionando Docke...
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
FROM capgov/centos:latest
MAINTAINER CAPGov-Infra

COPY FILES/docker-entrypoint.sh /

ENV MYSQL_CONFIG_FILE /usr/my.cnf

RUN groupadd --system --gid 5000 mysql && \
    useradd --create-home --system --home-dir "/home/mysql" --comment "MySQL User" --gid 5000 --uid 5000 mysql && \
    rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm && \
    yum update -y && \
    yum-config-manager --disable mysql57-community && \
    yum-config-manager --enable mysql56-community && \
    yum install -y install mysql-community-server && \
    yum clean all && \
    touch $MYSQL_CONFIG_FILE && \
    chmod 740 /docker-entrypoint.sh && \
    chown mysql. /docker-entrypoint.sh $MYSQL_CONFIG_FILE && \
    mkdir -p /docker-entrypoint-initdb.d && \
    chown -R mysql: /docker-entrypoint-initdb.d

EXPOSE 3306

USER mysql

WORKDIR /var/lib/mysql

VOLUME ["/var/lib/mysql"]

ENTRYPOINT ["/docker-entrypoint.sh"]