forked from CentOS/CentOS-Dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (24 loc) · 919 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
32
33
34
FROM centos:centos7
MAINTAINER The CentOS Project <[email protected]>
LABEL Vendor="CentOS"
LABEL License=GPLv2
LABEL Version=5.5.41
LABEL Build docker build --rm --tag centos/mariadb55 .
RUN yum -y install --setopt=tsflags=nodocs epel-release && \
yum -y install --setopt=tsflags=nodocs mariadb-server bind-utils pwgen psmisc hostname && \
yum -y erase vim-minimal && \
yum -y update && yum clean all
# Fix permissions to allow for running on openshift
COPY fix-permissions.sh ./
RUN ./fix-permissions.sh /var/lib/mysql/ && \
./fix-permissions.sh /var/log/mariadb/ && \
./fix-permissions.sh /var/run/
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
# Place VOLUME statement below all changes to /var/lib/mysql
VOLUME /var/lib/mysql
# By default will run as random user on openshift and the mysql user (27)
# everywhere else
USER 27
EXPOSE 3306
CMD ["mysqld_safe"]