A user-friendly, versatile, portable ubuntu toolbox in docker.
- Ubuntu bionic (18.04LTS)
- basic network utils like telnet, ping, etc.
- lsb
- ssh server
- oh my zsh
- docker engine (docker in docker)
- python2 and python3
- ...
git clone https://github.com/BananaWanted/Dubuntu
cd Dubuntu
# Install command line tools into /usr/local/bin
./installPull the latest image from docker hub
Run Dubuntu in background as a daemon
Build the image locally
Recreate / restart Dubuntu
Attatch to running Dubuntu
Use docker start dubuntu and docker stop dubuntu
Run Dubuntu as a disposible container
Launch dubuntu in current terminal as a disposible container, attach with zsh.
You may add -v <dir>:/shared/<dir> to the end of this command to mount something into the container.
Any docker related settings are defined in docker-compose.yaml. Simply add port mapping / volumes as you wish.
# make sure you are in side the Dubuntu directory
# And port 22 is mapped in `docker-compose.yaml` correctly
cat ~/.ssh/id_rsa.pub >> shared/authorized_keys
dubuntu-recreate
ssh root@localhost # or somewhere you defineddocker rmi $(docker images -q -f dangling=true)
simply re-run install.sh
Priority: ENV > Conf files
- APT_SOURCE=< tuna | official >
- APT_PACKAGES=< additional package list seprated by space >
- UNMINIMIZE=true # invoke command
unminimizein official ubuntu image at container start time.
Put files listed below inside /shared to override corresponding files inside the container.
sources.list: override/etc/apt/sources.listin VM.resolv.conf: override/etc/resolv.confin VM.authorized_keys: override/root/.ssh/authorized_keysin VM.dircolors: override color mapping of the inside console.profile: additionzshstartup source script.ssh_host_rsa_key: override /etc/ssh/ssh_host_rsa_key, the host rsa key. Will be generated automatically if not exists.zsh_history: override/root/.zsh_historyin VM.
- Because Docker for Mac is running in a real virtual machine(hyperkit), after a long sleep, the hyperkit may have its clock drift, which may cause the ssh connection fails. restart the container to workaround.
/shared/zsh_historycurrently not working
- Option for setup node.js dev environment
- Optional for setup basic web server environment
- Add to Homebrew
- Utilize Makefile to manage the mess
- Follow XDG Base Directory Specification for config file
- Add alpine based branch to reduce image size