Skip to content
Snippets Groups Projects
Commit dbad82b5 authored by jurgenhaas's avatar jurgenhaas
Browse files

Improve README with regard to SSH auth socket

parent e30dd8ea
No related branches found
Tags v3.7.33
No related merge requests found
Pipeline #
......@@ -143,7 +143,12 @@ There are potentially more options possible, for details please refer to the Dru
#### Configure SSH access from the PHP container
Your host SSH configuration is automatically forwarded to the PHP docker container using sockets and you don't have to do anything to make it work, as long as your host is configured correctly to access your live site via SSH - in this case the PHP container can too.
Your host SSH configuration is automatically forwarded to the PHP docker container using sockets and you don't have to do anything to make it work, as long as your host is configured correctly to access your live site via SSH - in this case the PHP container can too. This works by mounting and forwarding your `SSH_AUTH_SOCK` environment variable to `/ssh-agent` inside the PHP container, so that the user inside that container can utilize your SSH settings like your user outside the contain who built them.
Typical issues that may cause trouble in this context are:
- **Permission**: the user inside the container has to have the permission to access your SSH auth socket. The best way to ensure that is to run services inside the container as root. This should be OK in a development environment.
- **SSH key should be added to the socket**: Very often, that has already been done at some point during setup of your environment but if not, you should remember to add your key by calling `ssh-add /path/to/your/key` from the host.
### Using Drush
......@@ -342,11 +347,19 @@ When you're using `docker-compose` a lot, you'll get tired quickly by typing suc
alias c "docker-compose"
alias cb "docker-compose build"
alias cup "docker-compose up -d"
alias cr "docker-compose run --service-ports --rm"
alias crl "docker-compose run --service-ports --rm local"
alias crd "docker-compose run --service-ports --rm develop"
alias crt "docker-compose run --rm test"
alias crp "docker-compose run --rm provision"
alias crci "docker-compose run --rm ci"
alias crwt "docker-compose run --rm watchtest"
alias cps "docker-compose ps"
alias clogs "docker-compose logs"
alias cstop "docker-compose stop"
alias cstart "docker-compose start"
alias cdrush "docker-compose exec php drush"
alias cshell "docker-compose exec -u root php sh"
alias cdrush "docker-compose exec -u root php drush"
```
Do that once, it will pay back in a magnitude.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment