Skip to content

Commit f852789

Browse files
committed
update some guide format in the documentation
1 parent d32cfb3 commit f852789

1 file changed

Lines changed: 23 additions & 15 deletions

File tree

DOCUMENTATION/content/guides/index.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ Set the following variables:
326326
- `laradock/php-fpm/xdebug.ini`
327327

328328
Set the following variables:
329+
329330
```
330331
xdebug.remote_autostart=1
331332
xdebug.remote_enable=1
@@ -336,34 +337,39 @@ xdebug.cli_color=1
336337

337338
<a name="InstallCleanHouse"></a>
338339
### Need to clean house first?
340+
339341
Make sure you are starting with a clean state. For example, do you have other Laradock containers and images?
340342
Here are a few things I use to clean things up.
341343

342344
- Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name).
345+
343346
`docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}`
344347

345348
- Delete all images containing `laradock`.
349+
346350
`docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}`
347351
**Note:** This will only delete images that were built with `Laradock`, **NOT** `laradock/*` which are pulled down by `Laradock` such as `laradock/workspace`, etc.
348352
**Note:** Some may fail with:
349353
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
350354

351355
- I added this to my `.bashrc` to remove orphaned images.
352-
```
353-
dclean() {
354-
processes=`docker ps -q -f status=exited`
355-
if [ -n "$processes" ]; thend
356-
docker rm $processes
357-
fi
358-
359-
images=`docker images -q -f dangling=true`
360-
if [ -n "$images" ]; then
361-
docker rmi $images
362-
fi
363-
}
364-
```
356+
357+
```
358+
dclean() {
359+
processes=`docker ps -q -f status=exited`
360+
if [ -n "$processes" ]; thend
361+
docker rm $processes
362+
fi
363+
364+
images=`docker images -q -f dangling=true`
365+
if [ -n "$images" ]; then
366+
docker rmi $images
367+
fi
368+
}
369+
```
365370

366371
- If you frequently switch configurations for Laradock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
372+
367373
```
368374
# remove laravel* containers
369375
# remove laravel_* images
@@ -406,14 +412,14 @@ laradock_php-fpm_1 php-fpm Up 9000/tcp
406412
laradock_volumes_data_1 true Exit 0
407413
laradock_volumes_source_1 true Exit 0
408414
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
409-
410-
411415
```
412416

413417
<a name="enablePhpXdebug"></a>
414418
## Enable xDebug on php-fpm
419+
415420
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
416421
You should see something like the following:
422+
417423
```
418424
xDebug status
419425
laradock_php-fpm_1
@@ -422,6 +428,7 @@ Copyright (c) 1997-2016 The PHP Group
422428
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
423429
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
424430
```
431+
425432
Other commands include `.php-fpm/xdebug start | stop`.
426433

427434
If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when
@@ -430,6 +437,7 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will
430437

431438
<a name="InstallPHPStormConfigs"></a>
432439
## PHPStorm Settings
440+
433441
- Here are some settings that are known to work:
434442
- `Settings/BuildDeploymentConnection`
435443
- ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png)

0 commit comments

Comments
 (0)