mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-25 16:04:19 +08:00
FIX Dockerfile image creation
This commit is contained in:
parent
771750efcd
commit
b666b546b0
1 changed files with 40 additions and 39 deletions
79
Dockerfile
79
Dockerfile
|
@ -17,27 +17,29 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
FROM ubuntu:16.04
|
FROM ubuntu:18.04
|
||||||
RUN /bin/bash -c "export DEBIAN_FRONTEND=noninteractive" && \
|
RUN /bin/bash -c "export DEBIAN_FRONTEND=noninteractive" && \
|
||||||
/bin/bash -c "debconf-set-selections <<< 'mariadb-server-10.0 mysql-server/root_password password PASS'" && \
|
/bin/bash -c "debconf-set-selections <<< 'mariadb-server-10.0 mysql-server/root_password password PASS'" && \
|
||||||
/bin/bash -c "debconf-set-selections <<< 'mariadb-server-10.0 mysql-server/root_password_again password PASS'" && \
|
/bin/bash -c "debconf-set-selections <<< 'mariadb-server-10.0 mysql-server/root_password_again password PASS'" && \
|
||||||
|
/bin/bash -c "debconf-set-selections <<< 'tzdata tzdata/Zones/Europe select Madrid'" && \
|
||||||
|
/bin/bash -c "echo \"Europe/Zurich\" > /etc/timezone " && \
|
||||||
|
/bin/bash -c "ln -fs /usr/share/zoneinfo/`cat /etc/timezone` /etc/localtime" && \
|
||||||
apt-get -y update && apt-get install -y \
|
apt-get -y update && apt-get install -y \
|
||||||
apache2 \
|
apache2 \
|
||||||
cowsay \
|
cowsay \
|
||||||
cowsay-off \
|
cowsay-off \
|
||||||
git \
|
git \
|
||||||
curl \
|
curl \
|
||||||
libapache2-mod-php7.0 \
|
libapache2-mod-php7.2 \
|
||||||
mariadb-server \
|
mariadb-server \
|
||||||
php7.0 \
|
php7.2 \
|
||||||
php7.0-mysql \
|
php7.2-mysql \
|
||||||
php-curl \
|
php7.2-curl \
|
||||||
php-dompdf \
|
php-dompdf \
|
||||||
php-gd \
|
php7.2-gd \
|
||||||
php-mbstring \
|
php7.2-mbstring \
|
||||||
php-xml \
|
php7.2-xml \
|
||||||
php-xml-serializer \
|
php7.2-zip \
|
||||||
php-zip \
|
|
||||||
wget
|
wget
|
||||||
|
|
||||||
RUN a2enmod ssl
|
RUN a2enmod ssl
|
||||||
|
@ -57,38 +59,37 @@ COPY ./LICENSE /var/www/passman/
|
||||||
ADD https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh /var/www/passman
|
ADD https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh /var/www/passman
|
||||||
|
|
||||||
RUN service mysql restart && \
|
RUN service mysql restart && \
|
||||||
mysql -uroot -pPASS -e "SET PASSWORD = PASSWORD('');" && \
|
mysql -uroot -pPASS -e "SET PASSWORD = PASSWORD('');" && \
|
||||||
sed -i '0,/.*SSLCertificateChainFile.*/s/.*SSLCertificateChainFile.*/SSLCertificateChainFile \/etc\/ssl\/private\/fullchain.pem/' /etc/apache2/sites-enabled/default-ssl.conf && \
|
sed -i '0,/.*SSLCertificateChainFile.*/s/.*SSLCertificateChainFile.*/SSLCertificateChainFile \/etc\/ssl\/private\/fullchain.pem/' /etc/apache2/sites-enabled/default-ssl.conf && \
|
||||||
sed -i '0,/.*ssl-cert-snakeoil.pem.*/s/.*ssl-cert-snakeoil.pem.*/SSLCertificateFile \/etc\/ssl\/private\/cert.pem/' /etc/apache2/sites-enabled/default-ssl.conf && \
|
sed -i '0,/.*ssl-cert-snakeoil.pem.*/s/.*ssl-cert-snakeoil.pem.*/SSLCertificateFile \/etc\/ssl\/private\/cert.pem/' /etc/apache2/sites-enabled/default-ssl.conf && \
|
||||||
sed -i '0,/.*SSLCertificateKeyFile.*/s/.*SSLCertificateKeyFile.*/SSLCertificateKeyFile \/etc\/ssl\/private\/privkey.pem/' /etc/apache2/sites-enabled/default-ssl.conf && \
|
sed -i '0,/.*SSLCertificateKeyFile.*/s/.*SSLCertificateKeyFile.*/SSLCertificateKeyFile \/etc\/ssl\/private\/privkey.pem/' /etc/apache2/sites-enabled/default-ssl.conf && \
|
||||||
echo "echo hhvm" > /bin/phpenv && chmod +x /bin/phpenv && \
|
echo "echo hhvm" > /bin/phpenv && chmod +x /bin/phpenv && \
|
||||||
cd /var/www/passman && \
|
cd /var/www/passman && \
|
||||||
chmod +x before_install.sh && \
|
chmod +x before_install.sh && \
|
||||||
sleep 1 && \
|
sleep 1 && \
|
||||||
/bin/bash -c "./before_install.sh passman master mysql; exit 0" && \
|
/bin/bash -c "./before_install.sh passman master mysql; exit 0" && \
|
||||||
rm /var/www/server/apps/passman/before_install.sh && \
|
rm /var/www/server/apps/passman/before_install.sh && \
|
||||||
mv /var/www/server/* /var/www/html/ && \
|
mv /var/www/server/* /var/www/html/ && \
|
||||||
cd /var/www/html/ && \
|
cd /var/www/html/ && \
|
||||||
chmod +x occ && \
|
chmod +x occ && \
|
||||||
service mysql restart && \
|
service mysql restart && \
|
||||||
./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database mysql --database-pass 'owncloud' && \
|
./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database mysql --database-pass 'owncloud' && \
|
||||||
./occ check && \
|
./occ check && \
|
||||||
./occ status && \
|
./occ status && \
|
||||||
./occ app:list && \
|
./occ app:list && \
|
||||||
./occ app:enable passman && \
|
./occ app:enable passman && \
|
||||||
./occ upgrade && \
|
./occ upgrade && \
|
||||||
./occ config:system:set defaultapp --value=passman && \
|
./occ config:system:set defaultapp --value=passman && \
|
||||||
./occ config:system:set appstoreenabled --value=false && \
|
./occ config:system:set appstoreenabled --value=false && \
|
||||||
./occ config:system:set trusted_domains 2 --value=172.17.0.2 && \
|
./occ config:system:set trusted_domains 2 --value=172.17.0.2 && \
|
||||||
./occ config:system:set trusted_domains 3 --value=passman.cc && \
|
./occ config:system:set trusted_domains 3 --value=passman.cc && \
|
||||||
./occ config:system:set trusted_domains 4 --value=demo.passman.cc && \
|
./occ config:system:set trusted_domains 4 --value=demo.passman.cc && \
|
||||||
chown -R www-data /var/www
|
chown -R www-data /var/www
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
ENTRYPOINT service mysql start && \
|
ENTRYPOINT service mysql start && \
|
||||||
service apache2 start && \
|
service apache2 start && \
|
||||||
bash -c "trap 'echo stopping services...; service apache2 stop && service mysql stop && exit 0' SIGTERM SIGKILL; \
|
bash -c "trap 'echo stopping services...; service apache2 stop && service mysql stop && exit 0' SIGTERM SIGKILL; \
|
||||||
tail -f /var/www/html/data/nextcloud.log"
|
tail -f /var/www/html/data/nextcloud.log"
|
||||||
|
|
||||||
#/usr/games/cowsay -f dragon.cow "you might now login using username:admin password:admin" && \
|
#/usr/games/cowsay -f dragon.cow "you might now login using username:admin password:admin" && \
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue