Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GodziLaravel's avatar

GitLab : switch from vagrant/ homestead to docker

Hello ,

I installed Docker with Laradock

Now the structure of my project is :

$ ll
total 1173
drwxr-xr-x 1 jesui 197609      0 Jun  4 17:14 app/
-rwxr-xr-x 1 jesui 197609   1686 Apr 24 22:31 artisan*
drwxr-xr-x 1 jesui 197609      0 Apr 24 22:31 bootstrap/
-rw-r--r-- 1 jesui 197609   1797 May 29 11:16 composer.json
-rw-r--r-- 1 jesui 197609 249464 May 29 11:16 composer.lock
drwxr-xr-x 1 jesui 197609      0 May 29 11:16 config/
drwxr-xr-x 1 jesui 197609      0 Apr 24 22:31 database/
drwxr-xr-x 1 jesui 197609      0 Jun 11 14:03 laradock/
drwxr-xr-x 1 jesui 197609      0 May 23 14:43 node_modules/
-rw-r--r-- 1 jesui 197609   1735 May 25 15:45 package.json
-rw-r--r-- 1 jesui 197609 600781 May 25 15:45 package-lock.json
-rw-r--r-- 1 jesui 197609   1197 Apr 24 22:31 phpunit.xml
drwxr-xr-x 1 jesui 197609      0 May 12 16:34 public/
-rw-r--r-- 1 jesui 197609   4497 Apr 24 22:31 README.md
drwxr-xr-x 1 jesui 197609      0 Apr 24 22:31 resources/
drwxr-xr-x 1 jesui 197609      0 Jun  2 16:03 routes/
-rw-r--r-- 1 jesui 197609    563 Apr 24 22:31 server.php
drwxr-xr-x 1 jesui 197609      0 Apr 25 00:53 storage/
drwxr-xr-x 1 jesui 197609      0 Apr 24 22:31 tests/
drwxr-xr-x 1 jesui 197609      0 Jun 11 16:46 vendor/
-rw-r--r-- 1 jesui 197609    852 May 28 10:21 webpack.mix.js

git status :

On branch lef-navigation-add-sub-menu-stops
Your branch is up to date with 'origin/lef-navigation-add-sub-menu-stops'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        new file:   .gitmodules
        new file:   laradock

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   .idea/dataSources.xml
        modified:   .idea/vcs.xml

My question is (This is the first time to use Docker) : should I just add everything then commit->push ? or there is something else to do before?

Thanks

0 likes
1 reply
bobbybouwmann's avatar
Level 88

In most cases, yes. You always want to make sure that everyone is running the same local environment. That can be a vagrant box like Homestead or a Docker container like Laradock.

Homestead is in general not added to the project, because everyone installs the vagrant box locally on their own and is always the same on every machine. The same goes for Laradock, however, you probably have some more config here for the containers.

It's not recommended to keep the laradock directory if your project is going to production. So make sure you delete this directory on deployment. No need to keep it there.

1 like

Please or to participate in this conversation.