Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get an interactive shell inside a Google datalab container?

I need to install additional software in a Google datalab container that runs with docker. It is possible to run bash commands with %%bash .... However, this does not allow interactivity. So, I need an interactive shell within the container.

like image 666
Soren Avatar asked Nov 28 '25 05:11

Soren


2 Answers

If you need to modify the Datalab image you can write a new Dockerfile based on it like @Rambler suggested, or you can fork your own version, Datalab is open source.

like image 182
yelsayed Avatar answered Nov 30 '25 22:11

yelsayed


You can try running the container in interactive mode in the following way :

docker run -it --name=<container_name> <image>:<tag> /bin/bash

If the container is already running , you can leverage docker exec :

docker exec -it <container_name> /bin/bash
like image 35
Rambler Avatar answered Nov 30 '25 21:11

Rambler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!