Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker bash into server #1

Closed
pasankg opened this issue Sep 18, 2019 · 5 comments
Closed

docker bash into server #1

pasankg opened this issue Sep 18, 2019 · 5 comments

Comments

@pasankg
Copy link

pasankg commented Sep 18, 2019

Hi,
Can you please update the document on how to bash in to the server ?

CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                  NAMES
018c6dc007f7        nginx:alpine            "nginx -g 'daemon of…"   8 minutes ago       Up 4 minutes        0.0.0.0:8080->80/tcp   drupal8_nginx
7af5abe5ffcb        drupal:8.6-fpm-alpine   "docker-php-entrypoi…"   8 minutes ago       Up 8 minutes        9000/tcp               drupal8_drupal
a33a82d4194b        mysql:8                 "/entrypoint.sh --de…"   8 minutes ago       Up 8 minutes        3306/tcp, 33060/tcp    drupal8_mysql

I get below errors when trying;

$docker exec drupal8_drupal bash
OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown

$docker exec drupal8_nginx bash
OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown

Thanks

@dalenguyen
Copy link
Owner

dalenguyen commented Sep 18, 2019

Hi @pasankg, can you try

docker exec drupal8_drupal /bin/bash

or

docker exec drupal8_drupal sh
docker exec drupal8_drupal /bin/sh

@pasankg
Copy link
Author

pasankg commented Sep 19, 2019

Hi @dalenguyen
Thank you for your reply. I tried the commands as you said but doesn't seems to work.

Screen Shot 2019-09-19 at 10 00 54 am

@dalenguyen
Copy link
Owner

@pasankg sorry, you need to add -ti to the command

docker exec -ti drupal8_drupal /bin/sh

@pasankg
Copy link
Author

pasankg commented Sep 19, 2019

Thanks @dalenguyen that worked.
It doesn't seem to allow composer or drush commands in there.
Is there a way to resolve it too ?
Thanks again

@dalenguyen
Copy link
Owner

@pasankg moved to #2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants