VIM based dockerized IDE. It includes everything to make it a complete IDE experience from the CLI.
1.0K
Here the final VIM based dockerized IDE. It includes everything to make it a complete IDE experience from the CLI.
Firstly, download vim-ide image:
docker pull lcaparros/vim-ide
vim-ide docker image requires to bind-mount the docker socket from the host machine to the docker container. It is necessary to manage docker containers from vim-ide instance. It gives an oportunity to run and debug applications from host and vim-ide container. Depending on the host OS where Docker engine is executed you could need to type a different command to run it properly.
In adittion, the workspace directory can be shared between host and vim-ide container. In the example commands below workspace is specified as a shared volume and ports from 4000 to 4100 are exposed to enable them to development purpose, but just to clarify, it is not mandatory.
docker run -it --rm --name vim-ide -e "TERM=xterm-256color" -v /var/run/docker.sock:/var/run/docker.sock -v /home/user/workspace:/root/workspace -v /mnt/c/Users/luisc/.ssh:/root/.ssh -v /mnt/c/Users/user/git:/root/.config/git -p "4000-4100:4000-4100" lcaparros/vim-ide
Windows hosts do not count on /var/run/docker.sock. In this case Docke use a Virtual Machine with Linux to run Docker engine. So it is necessary to indicate the VM path, if available, instead of /var/run/docker.sock. If you are using Docker Desktop, it is recommended to enable WSL2 integration instead of HyperV or Windows container management. Please find more info about how to enable it here.
Imagine a Windows host with Debian Linux distribution running over WSL2 and with Docker installed123. In this case, the command below would work perfect.
docker run -it --rm --name vim-ide -e "TERM=xterm-256color" -v /var/run/docker.sock:/var/run/docker.sock -v /mnt/c/Users/user/workspace:/root/workspace -v /mnt/c/Users/luisc/.ssh:/root/.ssh -v /mnt/c/Users/user/git:/root/.config/git -p "4000-4100:4000-4100" lcaparros/vim-ide
Those images includes ZSH with Powerlevel10k theme by default with a configuration that includes an insane quantity of icons and characters. To assure a complete compatibility install Nerd Fonts and setup in your terminal emulator.
You can also modify p10k.zsh and zshrc files as desired with you own configuration.
VIM allows files management via command line. To work with a file in VIM, the command must start with :
1: The easiest way to setup Docker engine in your Debian WSL2 distribuion will be using Docker Desktop for Windows.
Once you have installed Docker Desktop for Windows, navigate to Resources within Settings panel. Now enable the integration with the desired distro into WSL Integration option. Remind you must be using Docker Desktop with WSL2 containers instead of Windows or HyperV ones.
2: To setup Debian Linux distribution running docker and docker compose you can execute package.sh script using sudo to install all the necessary dependencies. Possibly Docker will not start running. To make it run type:
$ sudo service docker start
If you get an error related with IPTALES it can be due to Debian in its latest vesions is using the new nftables firewall. To make Debian use the legacy IPTABLES type:
$ sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
$ sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
dockerd should start fine after switching to iptables-legacy.
3: You will need to use sudo to run docker. To avoid it you can add the user to docker group.
$ sudo gpasswd -a $USER docker
Note that the docker group grants privileges equivalent to the root user. For details on how this impacts security in your system, see Docker Daemon Attack Surface.
Content type
Image
Digest
Size
310.3 MB
Last updated
over 5 years ago
docker pull lcaparros/vim-ide