-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update in docker environmentt #12259
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
The whole premise of Docker is that we try and have the containers be somewhat 'disposable' - You should be able to chuck aside the old container, then spin up with a new one, and then you'll just be migrated to that new one. Even migrations, which happen to the database, not to the Snipe-IT app itself, should be handled since the "Docker entrypoint" runs migrations before starting the webserver. Especially if you're discarding the old container, I find it a bit baffling that for some reason you keep picking up the old version and not the new one? Maybe you need to try |
I agree 100% with what you wrote. Below is a snippet of my configuration.
please help. What could be the problem for me? |
I had a seemingly similar issue with the container not upgrading. I have some further builds on top of the basic image, and it turned out that docker compose doesn't rebuild on So I just needed to add an explicit |
Debug mode
Describe the bug
updating the environment based on the instructions below leads to a number of errors and makes it impossible to perform the update
https://snipe-it.readme.io/docs/upgrading
https://snipe-it.readme.io/docs/docker
Reproduction steps
Snipe-IT installation, stop old container, delete image, change docker-compose file (add e.g. :v6.0.14), run environment after that it will re-pull the latest Snipe-IT image version,
Launching the new container, but connecting to the same storage volume.
Nothing to migrate.
Every time "noting to migrate..." and footer with version number is not changing
docker exec container_name composer install --no-dev --prefer-source
get multiple:
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 0 updates, 28 removals
In GitDownloader.php line 246:
Failed to execute git show-ref --head -d
fatal: unsafe repository ('/var/www/html/vendor/theseer/tokenizer' is owned
by someone else)
To add an exception for this directory, call:
nizer
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [...]
so...
docker exec container_name git config --global --add safe.directory /var/www/html/vendor/theseer/token... etc..
after that.... one more time: docker exec container_name composer install --no-dev --prefer-source
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 0 updates, 5 removals
0 [>---------------------------] 0 [->--------------------------]
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
and
RUNING: docker exec container_name composer dump-autoload
Generating optimized autoload files
NOW running: docker exec container_name php artisan migrate --force
even after cache clear etc..
still nothing to migrate... and version snipeIT in foother still the same... :(
How to upgrade SnipeIT in docker-compose env.???
Expected behavior
Snipe-IT installation, stop old container, delete image, change docker-compose file (add e.g. :v6.0.14), run environment after that it will re-pull the latest Snipe-IT image version,
Launching the new container, but connecting to the same storage volume.
Nothing to migrate.
Every time "noting to migrate..." and footer with version number is not changing
docker exec container_name composer install --no-dev --prefer-source
get multiple:
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 0 updates, 28 removals
In GitDownloader.php line 246:
Failed to execute git show-ref --head -d
fatal: unsafe repository ('/var/www/html/vendor/theseer/tokenizer' is owned
by someone else)
To add an exception for this directory, call:
nizer
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [...]
so...
docker exec container_name git config --global --add safe.directory /var/www/html/vendor/theseer/token... etc..
after that.... one more time: docker exec container_name composer install --no-dev --prefer-source
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 0 installs, 0 updates, 5 removals
0 [>---------------------------] 0 [->--------------------------]
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
and
[root@sme sme]# docker exec itam.mansoft.com.pl_website composer dump-autoload
Generating optimized autoload files
Screenshots
No response
Snipe-IT Version
latest
Operating System
RockyLinux (RedHat)
Web Server
docker official image
PHP Version
8
Operating System
No response
Browser
No response
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: