FROM php:apache
RUN apt-get update && apt-get -y install zip libxml2-dev libpng-dev apt-utils && docker-php-ext-install mysqli simplexml mbstring gd && rm -r /var/lib/apt/lists/*
RUN rm /etc/apache2/sites-enabled/* && \
echo \<VirtualHost *:80\> > /etc/apache2/sites-enabled/mybb.conf && \
echo DocumentRoot /var/www/mybb >> /etc/apache2/sites-enabled/mybb.conf && \
echo \</VirtualHost\> >> /etc/apache2/sites-enabled/mybb.conf && \
cd /var/www && mkdir mybb && cd mybb && \
curl https://resources.mybb.com/downloads/mybb_1815.zip -o mybb.zip && \
unzip mybb.zip "Upload/*" && \
mv Upload/* . && \
rm -Rf Upload mybb.zip && \
mv inc/config.default.php inc/config.php && \
chmod 666 inc/config.php inc/settings.php && \
chmod -R 777 inc/languages && \
chmod 777 cache/ cache/themes/ uploads/ uploads/avatars/ admin/backups/
WORKDIR /var/www
EXPOSE 80
CMD ["apache2-foreground"]
FROM php:alpine
RUN apk update && apk add zip libxml2-dev libpng-dev && docker-php-ext-install mysqli simplexml mbstring gd
RUN \
mkdir /var/www && \
cd /var/www && mkdir mybb && cd mybb && \
curl https://resources.mybb.com/downloads/mybb_1815.zip -o mybb.zip && \
unzip mybb.zip "Upload/*" && \
mv Upload/* . && \
rm -Rf Upload mybb.zip && \
mv inc/config.default.php inc/config.php && \
chmod 666 inc/config.php inc/settings.php && \
chmod -R 777 inc/languages && \
chmod 777 cache/ cache/themes/ uploads/ uploads/avatars/ admin/backups/
WORKDIR /var/www/mybb
EXPOSE 80
CMD ["php","-S","0.0.0.0:80"]
Feng
没有评论:
发表评论