Last active
August 15, 2019 03:17
-
-
Save sky-joker/c23101516409a1686bcbb1d92d7b6a4a to your computer and use it in GitHub Desktop.
owncloudを動かすコンテナのDockerfile
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:7 | |
MAINTAINER sky-joker | |
RUN yum -y install gcc \ | |
gcc-c++ \ | |
mariadb \ | |
mariadb-devel \ | |
httpd httpd-devel \ | |
libxml2-devel \ | |
libcurl-devel \ | |
libpng-devel \ | |
libicu-devel \ | |
openldap-devel.i686 \ | |
bzip2 \ | |
make \ | |
openssh-server | |
RUN curl https://bootstrap.pypa.io/get-pip.py | python | |
RUN pip install pyOpenSSL | |
RUN mkdir /root/.ssh | |
ADD authorized_keys /root/.ssh | |
ADD https://www.php.net/distributions/php-7.2.21.tar.gz /tmp | |
RUN cd /tmp && \ | |
tar zxf php-7.2.21.tar.gz && \ | |
cd php-7.2.21 && \ | |
./configure \ | |
--enable-mbstring \ | |
--enable-zip \ | |
--enable-intl \ | |
--with-gd \ | |
--with-zlib \ | |
--with-curl \ | |
--with-apxs2=/usr/bin/apxs \ | |
--with-mysqli \ | |
--with-pdo-mysql \ | |
--with-ldap && \ | |
make && \ | |
make install | |
ADD https://download.owncloud.org/community/owncloud-10.2.1.tar.bz2 /var/www/html | |
RUN cd /var/www/html && \ | |
tar jxf owncloud-10.2.1.tar.bz2 && \ | |
rm -f owncloud-10.2.1.tar.bz2 && \ | |
chown apache.apache -R owncloud/ | |
RUN echo "AddType application/x-httpd-php .php" > /etc/httpd/conf.d/php.conf && \ | |
echo "DirectoryIndex index.php" >> /etc/httpd/conf.d/php.conf | |
RUN ssh-keygen -A | |
ADD startup.sh /opt | |
RUN chmod +x /opt/startup.sh | |
CMD /opt/startup.sh |
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
#!/usr/bin/bash | |
/usr/bin/rm -f /var/run/httpd/httpd.pid | |
/usr/bin/rm -f /var/run/sshd.pid | |
/usr/sbin/sshd -D & | |
/usr/sbin/httpd -DFOREGROUND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment