{
  "slug": "Troubles-update-composer-in-Laravel-when-develop-in-docker-17e3abeef50d",
  "title": "Troubles update composer in Laravel when develop in docker",
  "subtitle": "develop laravel on docker some times make many troubles . in this article reviews troubles of laravel when want composer update.",
  "excerpt": "develop laravel on docker some times make many troubles . in this article reviews troubles of laravel when want composer update.",
  "date": "2020-09-14",
  "tags": [
    "Laravel",
    "Docker"
  ],
  "readingTime": "1 min",
  "url": "https://medium.com/@mobinshaterian/troubles-update-composer-in-laravel-when-develop-in-docker-17e3abeef50d",
  "hero": "https://cdn-images-1.medium.com/max/800/1*t2e0BOxObgfpGlfDDfxOHg.png",
  "content": [
    {
      "type": "heading",
      "level": 2,
      "text": "Update composer Troubles when developing Laravel in Docker"
    },
    {
      "type": "paragraph",
      "html": "develop Laravel on docker some times make many troubles. in this article reviews the troubles of Laravel when want composer update."
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*t2e0BOxObgfpGlfDDfxOHg.png",
      "alt": "Troubles update composer in Laravel when develop in docker",
      "caption": "",
      "width": 1296,
      "height": 675
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*sTEsMgT13PSUE23F8sM8tg.png",
      "alt": "Troubles update composer in Laravel when develop in docker",
      "caption": "",
      "width": 305,
      "height": 165
    },
    {
      "type": "paragraph",
      "html": "my Architecture to build Laravel has many steps. at first, develop code on my computer and then send it to the develop server then build docker in the develop server and at last sending docker rep into the deploy server."
    },
    {
      "type": "paragraph",
      "html": "in this Architecture using composer to install some packages make many troubles and spend lot’s of time to debug some issues."
    },
    {
      "type": "heading",
      "level": 3,
      "text": "when composer update using these cache clear"
    },
    {
      "type": "paragraph",
      "html": "php artisan cache:clear"
    },
    {
      "type": "paragraph",
      "html": "permition of /bootstrap/cache/"
    },
    {
      "type": "paragraph",
      "html": "php artisan config:clear"
    },
    {
      "type": "paragraph",
      "html": "php artisan route:clear"
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/1200/1*dndNtT3E294-uiE9_nz8SA.png",
      "alt": "Troubles update composer in Laravel when develop in docker",
      "caption": "",
      "width": 1832,
      "height": 550
    },
    {
      "type": "paragraph",
      "html": "important thing is when build docker in development server must using clear cache."
    },
    {
      "type": "paragraph",
      "html": "SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables and table_name = migrations)"
    },
    {
      "type": "paragraph",
      "html": "this problem not appear as please clear your cache!. at first laravel say that can’t not connect to database in deploy server but after exec docker container with command below:"
    },
    {
      "type": "paragraph",
      "html": "docker-compose exec docker-name bash"
    },
    {
      "type": "paragraph",
      "html": "you understand that cache exist in deploy server and you force that fix this problem in develop server&nbsp;."
    }
  ]
}
