Skip to content

Commit

Permalink
mariaDB 10
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaskey committed Aug 7, 2018
1 parent 436051c commit 36e5f98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM tier/centos7base
FROM centos:centos7

# Define args and set a default value
ARG registry=docker.io
ARG maintainer=tier
ARG imagename=mariadb
ARG version=5.5
ARG version=10

MAINTAINER $maintainer
LABEL Vendor="Internet2"
Expand All @@ -15,15 +15,18 @@ LABEL Version=$version

LABEL Build docker build --rm --tag $registry/$maintainer/$imagename .

#copy MariaDB yum repo file
COPY ./conf/mariadb.repo /etc/yum.repos.d/

# Install base deps
RUN yum -y install --setopt=tsflags=nodocs mariadb-server bind-utils pwgen psmisc hostname vim
RUN yum -y install --setopt=tsflags=nodocs MariaDB-server bind-utils pwgen psmisc hostname vim

# Add starters and installers
ADD ./container_files /opt
RUN rm -rf /etc/my.cnf
COPY ./conf/my.cnf /etc
# Add Volumes and Set permissions
RUN mkdir /opt/shared && chmod 777 /opt/shared && chmod 777 /opt/bin/*.sh
RUN mkdir /opt/shared && chmod 777 /opt/shared && mkdir /var/log/mariadb && mkdir /var/run/mariadb && chmod 777 /opt/bin/*.sh && touch /tmp/firsttimerunning

# Place VOLUME statement below all changes to /var/lib/mysql
VOLUME /var/lib/mysql
Expand Down
13 changes: 2 additions & 11 deletions container_files/bin/fix-permissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

log="/tmp/permissions.log"

echo "Starting Container: " > $log
date >> $log
echo "" >> $log

# Taken from https://raw.githubusercontent.com/openshift/sti-base/master/bin/fix-permissions
# Fix permissions on the given directory to allow group read/write of
# regular files and execute of directories.
chgrp -R 0 $1 >> $log
chmod -R g+rw $1 >> $log
find $1 -type d -exec chmod g+x {} + >> $log

chmod -R 777 $1
find $1 -type d -exec chmod 777 {} + >> $log
exit 0

0 comments on commit 36e5f98

Please sign in to comment.