4 ms·
exec only works on specific running containers so you'll need the container id for this exec -ti f635776c2d08 /bin/bash i do this often enough that i keep
by castis 7y ago
exec only works on specific running containers so you'll need the container id for this
exec -ti f635776c2d08 /bin/bash
i do this often enough that i keep this in a makefile so i can do it by image name
docker exec -ti `docker ps | grep 'container-name' | awk '{print $$1}'` /bin/bash
- yjftsjthsd-h 7y agoYou only need to specify the container by ID if you're using docker directly; if you use docker-compose then you can use the service name and you don't need the `-ti`