Closed mdeggies closed 6 years ago
Trying to get cachet w/mysql working on docker (without docker compose). It's almost there, but I'm getting the below error on docker run {IMAGE}
docker run {IMAGE}
Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile * base: centos-distro.1gservers.com * epel: sjc.edge.kernel.org * extras: mirrors.syringanetworks.net * updates: mirror.sjc02.svwh.net * webtatic: us-east.repo.webtatic.com Resolving Dependencies --> Running transaction check ---> Package mariadb.x86_64 1:5.5.60-1.el7_5 will be installed ---> Package mariadb-server.x86_64 1:5.5.60-1.el7_5 will be installed --> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.60-1.el7_5.x86_64 --> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.60-1.el7_5.x86_64 --> Processing Dependency: perl(Data::Dumper) for package: 1:mariadb-server-5.5.60-1.el7_5.x86_64 --> Processing Dependency: perl(DBI) for package: 1:mariadb-server-5.5.60-1.el7_5.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: 1:mariadb-server-5.5.60-1.el7_5.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: 1:mariadb-server-5.5.60-1.el7_5.x86_64 --> Processing Dependency: libaio.so.1()(64bit) for package: 1:mariadb-server-5.5.60-1.el7_5.x86_64 --> Running transaction check ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed ---> Package perl-DBD-MySQL.x86_64 0:4.023-6.el7 will be installed ---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed --> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64 --> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64 ---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed --> Running transaction check ---> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed --> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch --> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch --> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch --> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch --> Running transaction check ---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed --> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch --> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch ---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed --> Running transaction check ---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed ---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: mariadb x86_64 1:5.5.60-1.el7_5 updates 8.9 M mariadb-server x86_64 1:5.5.60-1.el7_5 updates 11 M Installing for dependencies: libaio x86_64 0.3.109-13.el7 base 24 k perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 base 32 k perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 base 57 k perl-DBD-MySQL x86_64 4.023-6.el7 base 140 k perl-DBI x86_64 1.627-4.el7 base 802 k perl-Data-Dumper x86_64 2.145-3.el7 base 47 k perl-IO-Compress noarch 2.061-2.el7 base 260 k perl-Net-Daemon noarch 0.48-5.el7 base 51 k perl-PlRPC noarch 0.2020-14.el7 base 36 k Transaction Summary ================================================================================ Install 2 Packages (+9 Dependent packages) Total download size: 21 M Installed size: 110 M Downloading packages: -------------------------------------------------------------------------------- Total 7.1 MB/s | 21 MB 00:02 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : perl-Data-Dumper-2.145-3.el7.x86_64 1/11 Installing : libaio-0.3.109-13.el7.x86_64 2/11 Installing : 1:mariadb-5.5.60-1.el7_5.x86_64 3/11 Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 4/11 Installing : perl-Net-Daemon-0.48-5.el7.noarch 5/11 Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 6/11 Installing : perl-IO-Compress-2.061-2.el7.noarch 7/11 Installing : perl-PlRPC-0.2020-14.el7.noarch 8/11 Installing : perl-DBI-1.627-4.el7.x86_64 9/11 Installing : perl-DBD-MySQL-4.023-6.el7.x86_64 10/11 Installing : 1:mariadb-server-5.5.60-1.el7_5.x86_64 11/11 Verifying : 1:mariadb-server-5.5.60-1.el7_5.x86_64 1/11 Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 2/11 Verifying : perl-Net-Daemon-0.48-5.el7.noarch 3/11 Verifying : perl-Data-Dumper-2.145-3.el7.x86_64 4/11 Verifying : perl-DBD-MySQL-4.023-6.el7.x86_64 5/11 Verifying : perl-IO-Compress-2.061-2.el7.noarch 6/11 Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 7/11 Verifying : 1:mariadb-5.5.60-1.el7_5.x86_64 8/11 Verifying : perl-DBI-1.627-4.el7.x86_64 9/11 Verifying : libaio-0.3.109-13.el7.x86_64 10/11 Verifying : perl-PlRPC-0.2020-14.el7.noarch 11/11 Installed: mariadb.x86_64 1:5.5.60-1.el7_5 mariadb-server.x86_64 1:5.5.60-1.el7_5 Dependency Installed: libaio.x86_64 0:0.3.109-13.el7 perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBD-MySQL.x86_64 0:4.023-6.el7 perl-DBI.x86_64 0:1.627-4.el7 perl-Data-Dumper.x86_64 0:2.145-3.el7 perl-IO-Compress.noarch 0:2.061-2.el7 perl-Net-Daemon.noarch 0:0.48-5.el7 perl-PlRPC.noarch 0:0.2020-14.el7 Complete! 180921 17:23:13 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'. 180921 17:23:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql Application key [base64:XKdRCM9zGMrj68Dysj0+PWKaq0UCo7/opMeq48tsj0k=] set successfully. Loading composer repositories with package information Updating dependencies Package operations: 1 install, 34 updates, 0 removals - Updating symfony/css-selector (v3.2.1 => v3.4.15): Downloading (100%) - Updating classpreloader/classpreloader (3.1.0 => 3.2.0): Downloading (100%) - Updating symfony/polyfill-util (v1.3.0 => v1.9.0): Downloading (100%) - Updating symfony/polyfill-php56 (v1.3.0 => v1.9.0): Downloading (100%) - Updating jeremeamia/superclosure (2.3.0 => 2.4.0): Downloading (100%) - Updating monolog/monolog (1.22.0 => 1.23.0): Downloading (100%) - Updating mtdowling/cron-expression (v1.1.0 => v1.2.1): Downloading (100%) - Updating paragonie/random_compat (v1.4.1 => v1.4.3): Downloading (100%) - Updating swiftmailer/swiftmailer (v5.4.5 => v5.4.12): Downloading (100%) - Updating vlucas/phpdotenv (v2.4.0 => v2.5.1): Downloading (100%) - Updating symfony/event-dispatcher (v3.2.1 => v3.4.15): Downloading (100%) - Updating symfony/polyfill-mbstring (v1.3.0 => v1.9.0): Downloading (100%) - Installing symfony/polyfill-ctype (v1.9.0): Downloading (100%) - Updating nesbot/carbon (1.21.0 => 1.34.0): Downloading (100%) - Updating league/flysystem (1.0.32 => 1.0.47): Downloading (100%) - Updating alt-three/badger (v3.1.0 => v3.2.0): Downloading (100%) - Updating alt-three/throttle (v1.1.0 => v1.2.0): Downloading (100%) - Updating alt-three/validator (v1.5.0 => v1.6.0): Downloading (100%) - Updating guzzlehttp/psr7 (1.3.1 => 1.4.2): Downloading (100%) - Updating guzzlehttp/guzzle (6.2.2 => 6.3.3): Downloading (100%) - Updating aws/aws-sdk-php (3.20.11 => 3.67.16): Downloading (100%) - Updating backup-manager/backup-manager (1.1.1 => 1.2): Downloading (100%) - Updating backup-manager/laravel (1.1.2 => 1.3.1): Downloading (100%) - Updating barryvdh/laravel-cors (v0.8.2 => v0.8.6): Downloading (100%) - Updating doctrine/cache (v1.6.1 => v1.6.2): Downloading (100%) - Updating doctrine/dbal (v2.5.5 => v2.5.13): Downloading (100%) - Updating fideloper/proxy (3.2.0 => 3.3.4): Downloading (100%) - Updating graham-campbell/security (v3.6.0 => v3.7.0): Downloading (100%) - Updating graham-campbell/binput (v3.5.0 => v3.6.0): Downloading (100%) - Updating graham-campbell/core (v5.1.0 => v5.3.2): Downloading (100%) - Updating jenssegers/date (v3.2.7 => v3.3.1): Downloading (100%) - Updating twig/twig (v1.30.0 => v1.35.4): Downloading (100%) - Updating rcrowe/twigbridge (v0.9.3 => v0.9.6): Downloading (100%) - Updating roumen/feed (v2.10.4 => v2.10.5): Downloading (100%) - Updating bacon/bacon-qr-code (1.0.1 => 1.0.3): Downloading (100%) Package graham-campbell/core is abandoned, you should avoid using it. No replacement was suggested. Package roumen/feed is abandoned, you should avoid using it. Use laravelium/feed instead. Writing lock file Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postUpdate > php artisan optimize --force Generating optimized class loader Compiling common classes > php artisan config:cache Configuration cache cleared! Configuration cached successfully! > php artisan route:cache Route cache cleared! Routes cached successfully! Clearing settings cache... Settings cache cleared! Backing up database... Dumping database and uploading... Successfully dumped mysql, compressed with gzip and store it to local at 2018-09-21 17.24.57 Backup completed! Application key [base64:8P4HNSoyX/2FyMEH4cBk8esrRM8uvgmygZgn4tu7mpg=] set successfully. Configuration cache cleared! Configuration cached successfully! Route cache cleared! Routes cached successfully! Copied Directory [/vendor/roumen/feed/src/views] To [/resources/views/vendor/feed] Publishing complete for tag []! Nothing to migrate. Clearing cache... Application cache cleared! Cache cleared! Failed to get D-Bus connection: Operation not permitted
Here is the Dockerfile:
FROM centos:latest RUN yum -y install httpd httpd-tools mod_rewrite git zip unzip && \ systemctl enable httpd.service && \ yum clean all # install & start mysql in the background COPY entrypoint.sh /usr/local/bin/ RUN chmod 777 /usr/local/bin/entrypoint.sh RUN ln -s usr/local/bin/entrypoint.sh / RUN chmod +x /usr/local/bin/entrypoint.sh ENTRYPOINT ["entrypoint.sh"] # install PHP & dependencies RUN yum -y update && \ yum -y install epel-release && \ rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm && \ yum -y install php71w php71w-openssl php71w-mysql php71w-cli php71w-mbstring php71w-dom php71w-gd php71w-simplexml php71w-mcrypt php71w-xml php71w-tokenizer php7.1-zip # install composer RUN curl -sS https://getcomposer.org/installer -o composer-setup.php && \ php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \ rm -rf composer-setup.php # setup virtual hosts: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-7 RUN mkdir /etc/httpd/sites-available && \ mkdir /etc/httpd/sites-enabled && \ echo "IncludeOptional sites-enabled/*.conf" >> /etc/httpd/conf/httpd.conf COPY localhost-config.conf /etc/httpd/sites-available/localhost.conf # create link to sites-enabled directory to serve the content RUN ln -s /etc/httpd/sites-available/localhost.conf /etc/httpd/sites-enabled/localhost.conf # cachet specific steps RUN chmod -R 755 /var/www COPY . /var/www/Cachet EXPOSE 80 CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"]
Here is entrypoint.sh:
#!/bin/sh set -e yum -y install mariadb-server mariadb chmod -R 755 /var/lib/mysql/ /usr/bin/mysqld_safe --user=mysql --skip-grant-tables & cd /var/www/Cachet php artisan key:generate composer install --no-dev -o php artisan app:install apachectl restart exec "$@"
Ahh, I think it's failing on apachectl restart. Removed that and just trying to run /usr/sbin/httpd -D FOREGROUND now
apachectl restart
/usr/sbin/httpd -D FOREGROUND
Can you open this on the Docker repo please.
Trying to get cachet w/mysql working on docker (without docker compose). It's almost there, but I'm getting the below error on
docker run {IMAGE}
Here is the Dockerfile:
Here is entrypoint.sh: