If you try to install or upgrade either MariaDB or NextCloud, you may hit the following error:
=> ERROR [2/3] RUN sed -i.bak -e "s/^thread_cache_size/# thread_cache_size/" -e "s/^read_buffer_size/# read_buffer_size/" /defaults/my.cnf 1.5s
> [2/3] RUN sed -i.bak -e "s/^thread_cache_size/# thread_cache_size/" -e "s/^read_buffer_size/# read_buffer_size/" /defaults/my.cnf:
#0 0.541 sed: /defaults/my.cnf: No such file or directory
failed to solve: process "/bin/sh -c sed -i.bak -e \"s/^thread_cache_size/# thread_cache_size/\" -e \"s/^read_buffer_size/# read_buffer_size/\" /defaults/my.cnf" did not complete successfully: exit code: 1
IOTstack uses a local Dockerfile to customise MariaDB to do two things:
apply two "stability patches";
add a health-check to the container.
The stability patches are added to /defaults/my.cnfinside the container but the folks who maintain the base image for MariaDB have just renamed my.cnf to custom.cnf. That change of name is what's causing this failure.
NextCloud uses MariaDB so this problem will also prevent NextCloud from building properly.
I'll work on a pull request to fix this but, in the meantime, here's a temporary fix to get MariaDB and NextCloud running again:
Use a text editor to open the file:
~/IOTstack/.templates/mariadb/Dockerfile
As shown in the screen shot below, change my.cnf to custom.cnf, then save the file.
Be in the correct directory:
$ cd ~/IOTstack
Depending on which container(s) you are having trouble with, you may need either or both of the following commands:
$ docker-compose up -d --build mariadb
$ docker-compose up -d --build nextcloud_db
Tidy up:
$ docker system prune -f
This issue will remain open until the pull request is applied. If you place a "watch" on this issue, you'll be notified when that happens. Then you can undo the temporary fix like this:
$ cd ~/IOTstack
$ git restore .templates/mariadb/Dockerfile
$ git pull
If you try to install or upgrade either MariaDB or NextCloud, you may hit the following error:
IOTstack uses a local Dockerfile to customise MariaDB to do two things:
The stability patches are added to
/defaults/my.cnf
inside the container but the folks who maintain the base image for MariaDB have just renamedmy.cnf
tocustom.cnf
. That change of name is what's causing this failure.NextCloud uses MariaDB so this problem will also prevent NextCloud from building properly.
I'll work on a pull request to fix this but, in the meantime, here's a temporary fix to get MariaDB and NextCloud running again:
Use a text editor to open the file:
As shown in the screen shot below, change
my.cnf
tocustom.cnf
, then save the file.Be in the correct directory:
Depending on which container(s) you are having trouble with, you may need either or both of the following commands:
Tidy up:
This issue will remain open until the pull request is applied. If you place a "watch" on this issue, you'll be notified when that happens. Then you can undo the temporary fix like this: