-
Notifications
You must be signed in to change notification settings - Fork 187
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-alpine redis how to get into bash #43
Comments
These images don't contain Bash. They're based on Alpine Linux, but can you use I hope that helps. Please let me know so I can close out this issue if this has resolved your issue. |
Yes. You can close it. I use ash for now from alpine linux. Converting to alpine linux:
Using Docker Network options with the link below can we achieve what am intended? I wanted to call the below compose command from the webapp, the idea is to share the redis-server container with mulitple users only via redis-cli container exposing the redis-cli in web docker-compose run rcli |
Let me look into this and get back to you. |
any luck? regarding the cli and server redis container with cli container exposed to web and allowing the cli and redis server talking to internal private n/w |
you can install bash by adding to your Dockerfile: |
If you don't want to add to the size by installing bash, you can just run /bin/sh |
Usually, an Alpine Linux image doesn't contain bash, Instead you can use /bin/ash, /bin/sh, ash or only sh.
I hope this information helps you. |
Usually, an Alpine Linux image doesn't contain bash, Instead you can use /bin/ash, /bin/sh, ash or only sh. i.e:
I hope this information helps you. |
|
Just replace BASH to SH |
docker exec -it CONTAINER_ID sh |
@jansanchez is there any difference in any of these shells? |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
714ecf80a71b smebberson/alpine-redis "/init" 39 minutes ago Up 39 minutes 6379/tcp redis
$ docker exec -it redis bash
exec: "bash": executable file not found in $PATH
The text was updated successfully, but these errors were encountered: