When you open a Docker Console for the first time, Token2Shell builds a default container image (token2shell/console) based on Ubuntu OS. And then creates a container from that image and names it "token2shell_root". Whenever you open a Docker Console, this token2shell_root container is started and used for executing your commands (ex. /bin/bash).
Hence, if you want to replace the OS for the Docker Console, you simply need to create a new container with your own OS image and name it token2shell_root.
1. Create your own OS container image
Docker already has many official Linux images. However, they include only minimal set of tools and optimized for running a single app instead of providing a shell prompt. Hence, you should consider building your own image on top of official OS releases.
For additional information about official OS releases and building your own images, please visit:
Please note that in order to access the Docker server installed on Windows from your new container, you must have a "docker" client program. token2shell_root has this binary in /usr/bin. You can copy this to your new container or freshly download it from the official Docker site. When downloading from the official site, please note that you’re downloading a full package that also has other daemons and utility binaries; you just need a binary named "docker".
2. Rename containers
Once you have your own container that you want Token2Shell to open as a Docker Console, first rename existing token2shell_root container to "token2shell_root_old" or whatever other name that’s not token2shell_root. Then rename your new container to token2shell_root.
3. Stop the original Docker Console container (i.e., token2shell_root_old)
This also will close the connection.
4. Press F5 and reconnect to the Docker Console
Token2Shell should now open your new container instead of the default one.