diff --git a/extras/docker/centos8/base/Dockerfile b/extras/docker/centos8/base/Dockerfile index eac2152d3c..a45080629f 100644 --- a/extras/docker/centos8/base/Dockerfile +++ b/extras/docker/centos8/base/Dockerfile @@ -92,12 +92,10 @@ RUN dnf install -y --setopt=tsflags=nodocs \ php-yaml \ libzstd \ openldap-clients \ - http://firefly.artica.es/centos8/chromium-110.0.5481.177-1.el7.x86_64.rpm \ - http://firefly.artica.es/centos8/chromium-common-110.0.5481.177-1.el7.x86_64.rpm \ + chromium \ http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \ - http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm \ - http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm - + http://firefly.artica.es/centos7/wmic-1.4-1.el7.x86_64.rpm + RUN mkdir -p /run/php-fpm/ ; chown -R root:apache /run/php-fpm/ # Not installed perl-Net-Telnet gtk-update-icon-cach ghostscript-fonts diff --git a/extras/docker/centos8/build_image_el8.sh b/extras/docker/centos8/build_image_el8.sh index d4abd11eb8..c31be67d00 100755 --- a/extras/docker/centos8/build_image_el8.sh +++ b/extras/docker/centos8/build_image_el8.sh @@ -64,7 +64,7 @@ wget $oconsoleurl wget $oserverurl if [ "$BASEBUILD" == 1 ] ; then - docker pull centos:8 + docker pull rockylinux:8 # Open Base image echo "building Base el8 image" cd $DOCKER_PATH/base @@ -77,11 +77,11 @@ else fi if [ "$DBBUILD" == 1 ] ; then - docker pull percona:5.7 + docker pull percona:8.0 # Percona image echo "building Percona image" - cd $OPEN/extras/docker/percona - docker build -t $PERCONA_IMAGE:latest -f $OPEN/extras/docker/percona/Dockerfile $OPEN/extras/docker/percona + cd $OPEN/extras/docker/percona/8.0 + docker build -t $PERCONA_IMAGE:latest -f $OPEN/extras/docker/percona/8.0/Dockerfile $OPEN/extras/docker/percona/8.0/ echo -e ">>>> \n" fi diff --git a/extras/docker/centos8/docker-compose.yml b/extras/docker/centos8/docker-compose.yml index 37df7251f5..06f5cf1c31 100644 --- a/extras/docker/centos8/docker-compose.yml +++ b/extras/docker/centos8/docker-compose.yml @@ -8,6 +8,8 @@ services: image: pandorafms/pandorafms-percona-base restart: always #command: ["mysqld", "--innodb-buffer-pool-size=900M"] + cap_add: + - SYS_NICE # CAP_SYS_NICE environment: MYSQL_ROOT_PASSWORD: pandora MYSQL_DATABASE: pandora diff --git a/extras/docker/percona/Dockerfile b/extras/docker/percona/5.7/Dockerfile similarity index 100% rename from extras/docker/percona/Dockerfile rename to extras/docker/percona/5.7/Dockerfile diff --git a/extras/docker/percona/8.0/Dockerfile b/extras/docker/percona/8.0/Dockerfile new file mode 100644 index 0000000000..ae8f544c7a --- /dev/null +++ b/extras/docker/percona/8.0/Dockerfile @@ -0,0 +1,11 @@ +#docker build -t pandorafms/pandorafms-percona-base:80 . +#docker tag pandorafms/pandorafms-percona-base:80 pandorafms/pandorafms-percona-base:latest +#docker push pandorafms/pandorafms-percona-base:80 + + +FROM percona:8.0 +ADD pandora.cnf /etc/my.cnf.d/ +USER root +RUN chown mysql:mysql /etc/my.cnf.d/pandora.cnf +USER mysql +EXPOSE 3306 diff --git a/extras/docker/percona/8.0/compose/docker-compose.yml b/extras/docker/percona/8.0/compose/docker-compose.yml new file mode 100644 index 0000000000..293efb63a2 --- /dev/null +++ b/extras/docker/percona/8.0/compose/docker-compose.yml @@ -0,0 +1,20 @@ +# Use root/example as user/password credentials +# este compose incluye la base de datos en otro docker y levanta aplicacion y DB juntos +version: '3.1' + +services: + db: + image: pandorafms/pandorafms-percona-base:80 + restart: always + command: ["mysqld", "--innodb-buffer-pool-size=1G"] + cap_add: + - SYS_NICE # CAP_SYS_NICE + environment: + MYSQL_ROOT_PASSWORD: pandora + MYSQL_DATABASE: pandora + MYSQL_USER: pandora + MYSQL_PASSWORD: pandora + networks: + - pandora +networks: + pandora: \ No newline at end of file diff --git a/extras/docker/percona/8.0/pandora.cnf b/extras/docker/percona/8.0/pandora.cnf new file mode 100644 index 0000000000..802b181b61 --- /dev/null +++ b/extras/docker/percona/8.0/pandora.cnf @@ -0,0 +1,39 @@ +# copy this file to /etc/my.cnf.d/pandora.cnf directory inside the container to set the onfiguration + +[mysqld] +datadir=/var/lib/mysql +user=mysql +character-set-server=utf8mb4 +skip-character-set-client-handshake +# Disabling symbolic-links is recommended to prevent assorted security risks +symbolic-links=0 +# Mysql optimizations for Pandora FMS +# Please check the documentation in http://pandorafms.com for better results + +max_allowed_packet = 64M +innodb_lock_wait_timeout = 90 +innodb_file_per_table +innodb_flush_log_at_trx_commit = 0 +innodb_flush_method = O_DIRECT +innodb_log_file_size = 64M +innodb_log_buffer_size = 16M +innodb_io_capacity = 300 +thread_cache_size = 8 +thread_stack = 256K +max_connections = 100 + +key_buffer_size=4M +read_buffer_size=128K +read_rnd_buffer_size=128K +sort_buffer_size=128K +join_buffer_size=4M + +# legacy compatibility +default_authentication_plugin=mysql_native_password +log_error_suppression_list='MY-013360' + +skip-log-bin + +sql_mode="" + + \ No newline at end of file diff --git a/extras/docker/percona/8.0/run_docker b/extras/docker/percona/8.0/run_docker new file mode 100644 index 0000000000..3757a78d4a --- /dev/null +++ b/extras/docker/percona/8.0/run_docker @@ -0,0 +1,6 @@ +docker run --name pandora-percona \ +-e MYSQL_ROOT_PASSWORD=pandora \ +-e MYSQL_DATABASE=pandora \ +-e MYSQL_USER=pandora \ +-e MYSQL_PASSWORD=pandora \ +-d pandora_percona:80