Is there any way to share a .bash_history
volume with a docker container so that everytime I go into a shell I have my bash history available for scrolling through?
Would be awesome to be able to do the same thing with IPython too.
The Visual Studio Code Dev Containers extension lets you use a Docker container as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of Visual Studio Code's full feature set.
Docker Hub can automatically test changes to your source code repositories using containers. You can enable Autotest on any Docker Hub repository to run tests on each pull request to the source code repository to create a continuous integration testing service.
Dockerizing is the process of packing, deploying, and running applications using Docker containers. Docker is an open source tool that ships your application with all the necessary functionalities as one package.
Docker is supposed to be a cross-platform tool. It runs on MacOS, Windows and Linux. You can use the containers everywhere, so it should be cross-platform.
It is the example from the documentation about volume: Mount a host file as a data volume:
docker run --rm -it -v ~/.bash_history:/root/.bash_history ubuntu /bin/bash
This will drop you into a bash shell in a new container, you will have your bash history from the host and when you exit the container, the host will have the history of the commands typed while in the container.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With