1. Confirm docker is running… Display a list of all containers…
Docker Info
Docker ps –a
Notice the ID of the container that you want to connect to: Is it running? If not you can start it with:
Docker Start <ContainerID>
Since the container is running wordpress (or other web engine) it will not have an interactive session attached to it. To create a new interactive
docker exec –it <ContainerID> bash
![]()
You will then get a new prompt and automatically dropped into /var/www/html Notice your prompt changed ![]()
ls
You will now see a list of the files and folders
![]()
I do not have an editor installed yet so I will install VIM
apt-get update
apt-get install vim
I am going to make a change in wp-config.php
vi wp-config.php
add these two lines in
define( ‘WP_REDIS_HOST’, ‘redis’ );
define( ‘WP_REDIS_PORT’, 6379 );
<Escape> then :wq! to save changes
cat wp-config.php then scroll up to see my changes in the file
To Exit out of the container…
exit