Run Sublime Text 3 from inside a Docker Container.
10K+
This Docker image will allow us to run the amazing Sublime Text 3 without the need to install it in our computers.
Another benefit is to be able to try different Sublime Text builds, with different Programming Languages versions.
The motivation to create this package come from the burn of reinstalling my Development environment across several computers each time I install/upgrade an OS or change computer.
So this package is the first of a series of other packages to make my Development environment very portable, easy and fast to install in any computer.
bash -c "$(curl -fsSL https://gitlab.com/exadra37-docker/sublime-text-3/raw/master/setup/install)"
bash -c "$(wget https://gitlab.com/exadra37-docker/sublime-text-3/raw/master/setup/install -O -)"
Sublime Text will persist settings, cache and installed packages in the Container dir /home/$USER/.dockerize/sublime-text-3/profiles/profile-name that is mapped into the host dir /home/$USER/.config/sublime-text-3. Meaning that changes done inside the Container will be available in the host and vice versa.
basic, but other ones can be created for each use case or programming language.3126. Any other build of Sublime can be used to build a local Docker Image.exadra37/sublime-textt-3 is pulled from Docker Hub. A local one can be build or another one can be pulled from Docker Hub.$PWD variable. Another dir can be provided.Check how to use it at any time...
sublime -h
The image used is the one in Docker Hub and the current dir $PWD, without the part /home/$USER is mapped to same path on the container and using the default profile baisc.
sublime
This will create a new profile called php in /home/$USER/.dockerize/sublime-text-3/profiles/php. Now you can install packages and customize settings just for this PHP profile.
sublime -p php
So each time we want to launch Sublime optimized to work on PHP projects we just run the same command used above.
Personalize the current Docker Hub exadra37/sublime-text-3 by extending it and then use it like...
sublime -i my-docker-hub-image-name
This will build locally, using the same Dockerfile used to build the Docker Hub Image...
sublime -l
Currently the Sublime Text build defaults to 3126.
We can build a local Docker Image with a previous or future build of Sublime Text, just by providing a different build number...
sublime -b 3124
Instead of mapping the current dir as the host workspace, another one can be provided...
sublime -w /absolute/workspace/path/in/host
To rebuild the local image just do like...
sublime -r
For trouble shouting Sublime Text 3 installation we may need to go inside the docker container.
To help us on that, when starting the container the exact command will be printed, and will look like:
sudo docker exec -it ST3_1486504665 zsh
Content type
Image
Digest
Size
142 MB
Last updated
over 9 years ago
docker pull exadra37/sublime-text-3