Created
July 20, 2018 12:06
-
-
Save ynott/82613347897131654c83e827f91a611a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos6 | |
MAINTAINER linaction | |
RUN /bin/cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime | |
RUN yum -y install httpd php php-mysql mysql-server tar wget php-gd | |
WORKDIR /tmp/ | |
RUN wget https://ja.wordpress.org/latest-ja.tar.gz | |
RUN tar xvfz ./latest-ja.tar.gz | |
RUN rm -f ./latest-ja.tar.gz | |
RUN cp -rpf wordpress/* /var/www/html/ | |
RUN cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php | |
RUN sed -i -e 's/database_name_here/wordpress/g' -e 's/username_here/wordpress/g' -e 's/password_here/wppass/g' /var/www/html/wp-config.php | |
RUN chown -R apache.apache /var/www/html/ | |
RUN service mysqld start && mysql -u root -e "CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wppass'; FLUSH PRIVILEGES;" && service mysqld stop | |
RUN echo -e "service mysqld start\nservice httpd start\n/bin/bash" > /startService.sh | |
RUN chmod o+x /startService.sh | |
EXPOSE 80 | |
CMD /startService.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment