linuxserver / docker-bookstack

A Docker container for the BookStack documentation wiki
GNU General Public License v3.0
814 stars 109 forks source link

[BUG] Stupid latest tag for images #222

Closed itJunky closed 2 months ago

itJunky commented 3 months ago

Is there an existing issue for this?

Current Behavior

I have old installation in docker-compose and now i need to update it, but can't do this because I don't know version of mariadb docker image in my old installation. I see mysql Ver 15.1 Distrib 10.5.15-MariaDB, for Linux (x86_64) using readline 5.1

But when i do docker-compose pull linuxserver/mariadb:v10.5.15 getting error ERROR: No such service: linuxserver/mariadb:v10.5.15

But if i don't set any version and run compose on my new machine getting another error infinitly:

bookstack_db    | cat: /var/run/mysqld/mysqld.pid: No such file or directory
bookstack_db    | 240815 17:38:37 mysqld_safe Logging to '/config/databases/b5ea2114337b.err'.
bookstack_db    | 240815 17:38:37 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack_db    | Caught SIGTERM signal!

Expected Behavior

I found only versions for bookstack https://hub.docker.com/r/solidnerd/bookstack/tags and see nothing when try to open some in lscr.io/linuxserver/mariadb what tags i need to use to correctly upgrade?

Don't use latest tag! It's always bad. I need to know about update everytime and don't want to know about update when run it on another machine and it is say An Error Occurred. WHAT ERRROR??? Shit happens? )) Error occurred... Need info about error reason!

Steps To Reproduce

Run compose with some old version like 20 or lower. Than move data to another server and run compose with latest tags and you see stupid message "An Error Occurred" after login.

Environment

- OS: ubuntu/debian
- How docker service was installed: from apt

CPU architecture

x86-64

Docker creation

docker-compose up

Container logs

ookstack_db    | 240815 17:25:28 mysqld_safe Logging to '/config/databases/b5ea2114337b.err'.
bookstack_db    | 240815 17:25:28 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack_db    | Caught SIGTERM signal!
bookstack_db    | cat: /var/run/mysqld/mysqld.pid: No such file or directory
bookstack_db    | 240815 17:25:29 mysqld_safe Logging to '/config/databases/b5ea2114337b.err'.
bookstack_db    | 240815 17:25:29 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack_db    | Caught SIGTERM signal!
bookstack_db    | cat: /var/run/mysqld/mysqld.pid: No such file or directory
bookstack_db    | 240815 17:25:31 mysqld_safe Logging to '/config/databases/b5ea2114337b.err'.
bookstack_db    | 240815 17:25:31 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack_db    | Caught SIGTERM signal!
bookstack_db    | cat: /var/run/mysqld/mysqld.pid: No such file or directory
bookstack_db    | 240815 17:25:32 mysqld_safe Logging to '/config/databases/b5ea2114337b.err'.
bookstack_db    | 240815 17:25:32 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack_db    | Caught SIGTERM signal!
bookstack_db    | cat: /var/run/mysqld/mysqld.pid: No such file or directory
bookstack_db    | 240815 17:25:34 mysqld_safe Logging to '/config/databases/b5ea2114337b.err'.
bookstack_db    | 240815 17:25:34 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack_db    | Caught SIGTERM signal!
bookstack_db    | cat: /var/run/mysqld/mysqld.pid: No such file or directory
bookstack_db    | 240815 17:25:35 mysqld_safe Logging to '/config/databases/b5ea2114337b.err'.
bookstack_db    | 240815 17:25:35 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack_db    | Caught SIGTERM signal!
bookstack_db    | cat: /var/run/mysqld/mysqld.pid: No such file or directory
bookstack       | PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
bookstack       | 
bookstack       |    Illuminate\Database\QueryException 
bookstack       | 
bookstack       |   SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select table_name as `name`, (data_length + index_length) as `size`, table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'bookstackapp' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name)
bookstack       | 
bookstack       |   at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829
bookstack       |     825▕                     $this->getName(), $query, $this->prepareBindings($bindings), $e
bookstack       |     826▕                 );
bookstack       |     827▕             }
bookstack       |     828▕ 
bookstack       |   ➜ 829▕             throw new QueryException(
bookstack       |     830▕                 $this->getName(), $query, $this->prepareBindings($bindings), $e
bookstack       |     831▕             );
bookstack       |     832▕         }
bookstack       |     833▕     }
bookstack       | 
bookstack       |       +39 vendor frames 
bookstack       | 
bookstack       |   40  /app/www/artisan:35
bookstack       |       Illuminate\Foundation\Console\Kernel::handle()
bookstack       | 
bookstack       | [custom-init] No custom files found, skipping...
bookstack       | [ls.io-init] done.
bookstack       | [15-Aug-2024 14:25:36] NOTICE: PHP message: PHP Warning:  PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
bookstack_db    | 240815 17:25:37 mysqld_safe Logging to '/config/databases/b5ea2114337b.err'.
bookstack_db    | 240815 17:25:37 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack_db    | Caught SIGTERM signal!
bookstack_db    | cat: /var/run/mysqld/mysqld.pid: No such file or directory
bookstack_db    | 240815 17:25:38 mysqld_safe Logging to '/config/databases/b5ea2114337b.err'.
bookstack_db    | 240815 17:25:38 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack_db    | Caught SIGTERM signal!
bookstack_db    | cat: /var/run/mysqld/mysqld.pid: No such file or directory
bookstack_db    | 240815 17:25:40 mysqld_safe Logging to '/config/databases/b5ea2114337b.err'.
bookstack_db    | 240815 17:25:40 mysqld_safe Starting mariadbd daemon with databases from /config/databases
bookstack_db    | Caught SIGTERM signal!
github-actions[bot] commented 3 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

thespad commented 3 months ago

docker-compose pull linuxserver/mariadb:v10.5.15 will attempt to pull the image associated with the service called linuxserver/mariadb:v10.5.15, which you won't have.

Either do docker compose pull bookstack_db or docker pull linuxserver/mariadb:v10.5.15

itJunky commented 3 months ago

But if i pull image without tag, i get latest, not needed old version and db container crashed again:

# docker-compose pull bookstack_db
Pulling bookstack_db ... done
# docker image ls -a | grep book
lscr.io/linuxserver/bookstack                                latest                 d0ede66c9a34   2 days ago      376MB
lscr.io/linuxserver/bookstack                                amd64-version-v24.05   f376a799148b   2 months ago    373MB
lscr.io/linuxserver/bookstack                                amd64-version-v24.02   cb88426e82dc   5 months ago    369MB
lscr.io/linuxserver/bookstack                                amd64-version-v23.10   170545cd1978   9 months ago    366MB
lscr.io/linuxserver/bookstack                                amd64-version-v23.01   ad907ee10d0a   18 months ago   270MB
lscr.io/linuxserver/bookstack                                amd64-22.11.1          dd123008ad9a   19 months ago   268MB
lscr.io/linuxserver/bookstack                                amd64-version-v22.10   1c5401a0f543   22 months ago   262MB
lscr.io/linuxserver/bookstack                                amd64-version-v22.09   2f16aaae5de7   23 months ago   257MB
lscr.io/linuxserver/bookstack                                amd64-version-v22.06   2a82fde91910   2 years ago     402MB
lscr.io/linuxserver/bookstack                                amd64-21.12.5          ba3f4445f98f   2 years ago     398MB

And i don't see bookstack_db images after pulling. When i try just add version as tag like you, i'm getting error about wrong tag:

# docker-compose pull linuxserver/mariadb:v10.5.15
ERROR: No such service: linuxserver/mariadb:v10.5.15

And here we go back to my first question. Where i can find list of correct tags for your special mariadb container?

Roxedus commented 3 months ago

You can not specify what tag to pull with docker(-)compose pull, only docker pull. Compose pull will use the version specified for the services in your compose. There is two services in play, bookstack and bookstack_db. linuxserver/mariadb:v10.5.15 is not a service in your coompose.

Spad outlined two commands you can use, you did neither of them.

Tags are, like always, available on dockerhub, https://hub.docker.com/r/linuxserver/mariadb/tags

itJunky commented 3 months ago

@Roxedus But in last message i did all two commands and show their output. Repeat it for you:

# docker-compose pull bookstack_db Pulling bookstack_db ... done

and wrong command too: # docker compose pull bookstack_db

docker: 'compose' is not a docker command.
See 'docker --help'

and second command:

# docker-compose pull linuxserver/mariadb:v10.5.15

ERROR: No such service: linuxserver/mariadb:v10.5.15
Roxedus commented 3 months ago

Nowhere do we say to do docker-compose pull linuxserver/mariadb:v10.5.15

If you want to use docker-compose pull, you need to set the image for the bookstack_db service to linuxserver/mariadb:v10.5.15, then do a docker-compose pull bookstack_db.

itJunky commented 3 months ago

@Roxedus i see this command in message https://github.com/linuxserver/docker-bookstack/issues/222#issuecomment-2291478652 from @thespad

Now i have this line in compose:

  bookstack_db:
    image: lscr.io/linuxserver/mariadb

If i set:

  bookstack_db:
    image: lscr.io/linuxserver/mariadb:v10.5.15

Getting error:

Pulling bookstack_db ... error

ERROR: for bookstack_db  manifest unknown
ERROR: manifest unknown

If i set:

  bookstack_db:
    image: linuxserver/mariadb:v10.5.15

Error is:

Pulling bookstack_db ... error

ERROR: for bookstack_db  manifest for linuxserver/mariadb:v10.5.15 not found: manifest unknown: manifest unknown
ERROR: manifest for linuxserver/mariadb:v10.5.15 not found: manifest unknown: manifest unknown
thespad commented 3 months ago

The tag is 10.5.15 not v10.5.15. You can see all of the valid tags here.

Roxedus commented 3 months ago

The tag doesn't exist. We simply used the example tag you provided, as you used the command wrong.

itJunky commented 3 months ago

@thespad thanks for the link to list of tags. But i think in main repo need set specific version always, not latest.

thespad commented 3 months ago

There will always* be a latest tag and it will continue to be the tag listed in all the documentation because there are frequently multiple valid current tags and no sensible way to guess which is appropriate for any given user.

If you don't specify a tag you will get latest, that's not our decision it's part of the way docker is designed.

LinuxServer-CI commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 month ago

This issue is locked due to inactivity