wallabag/docker

can't remove '/var/www/wallabag/var/cache': Invalid argument

curionox opened this issue · 6 comments

Environment
Version: docker wallabag/wallabag
Installation: docker
PHP version:
Database: mysql
Parameters:
What steps will reproduce the bug?
When I execute the following command as root on Alpine

use docker-compsoe

services:
  wallabag:
    image: wallabag/wallabag
    container_name: wallabag
    environment:
      - MYSQL_ROOT_PASSWORD=wallaroot
      - SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
      - SYMFONY__ENV__DATABASE_HOST=db
      - SYMFONY__ENV__DATABASE_PORT=3306
      - SYMFONY__ENV__DATABASE_NAME=wallabag
      - SYMFONY__ENV__DATABASE_USER=wallabag
      - SYMFONY__ENV__DATABASE_PASSWORD=wallapass
      - SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
      - SYMFONY__ENV__REDIS_PORT=7379
      - SYMFONY__ENV__DATABASE_TABLE_PREFIX="wallabag_"
      - SYMFONY__ENV__MAILER_DSN=~
      - SYMFONY__ENV__FROM_EMAIL=403067783@qq.com
      - SYMFONY__ENV__DOMAIN_NAME=https://***:443
      - SYMFONY__ENV__SERVER_NAME="wallabag"
    ports:
      - '6080:80'
    volumes:
      - /opt/wallabag/images:/var/www/wallabag/web/assets/images
      - /opt/wallabag/data:/var/www/wallabag/data
    healthcheck:
      test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost/"]
      interval: 1m
      timeout: 3s
    depends_on:
      - db
      - redis
  db:
    image: mariadb
    environment:
      - MYSQL_ROOT_PASSWORD=wallaroot
    ports:
      - 3306:3306
    volumes:
      - /opt/mariadb/data:/var/lib/mysql
  redis:
    image: redis:alpine
    ports:
      - 7379:6379```

db_1 | Version: '11.0.2-MariaDB-1:11.0.2+maria~ubu2204' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
db_1 | 2023-07-05 6:50:40 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '172.24.0.4' (This connection closed normally without authentication)
wallabag | WARN: MySQL database is already configured. Remove the environment variable with root password.
wallabag | rm: can't remove '/var/www/wallabag/var/cache': Invalid argument
wallabag exited with code 1

Same issue here, just on LXC container Debian Bookworm on Proxmox. Oh and i wanna use a already running maraidb on a different host :-(

Same here. Log output. LXC with ubuntu and portainer.


Checked Status Recommendation


PDO Driver (pdo_mysql) OK!

Database connection OK!

Database version OK!

curl_exec OK!

curl_multi_init OK!


[OK] Success! Your system can run wallabag properly.

Step 2 of 4: Setting up database.


Creating schema...

Clearing the cache...

Database successfully setup.

Step 3 of 4: Administration setup.


Administration successfully setup.

Step 4 of 4: Config setup.


Config successfully setup.

[OK] wallabag has been successfully installed.

[OK] You can now configure your web server, see https://doc.wallabag.org

rm: can't remove '/var/www/wallabag/var/cache': Invalid argument

Same here on CentOS 7. To work around the problem temporarily, I downgraded wallabag/wallabag from version 2.5.4 to 2.5.2.

I can confirm that downgrading to wallabag version 2.5.2 solves the issue. Database type doesn’t matter. Tested on lxc Debian 12.

As a workaround I am building my own wallabag container for this purpose with the following Dockerfile:

FROM wallabag/wallabag:2.6.6

RUN sed -i 's/rm -f -r /var/www/wallabag/var/cache/echo "Disable cache delete"/g' /entrypoint.sh

Seems this helps for my environment. But I still don't understand why the rm command is not possible and has to be ommited.

Downgrading to 2.5.2 fixed things here, still broken on latest