7 cool uses for Docker: WINE and tweeting from terminals
Container technology is anything but new, but that doesn’t mean we can’t still figure out some new, cool uses for Docker.
Linux containers, otherwise known as LXC, were first to the market on August 6, 2008. They made it possible to run multiple isolated Linux environments on a single Linux host. Docker took that took the next level starting in 2013, and is now the most popular and widely-used container management system. Since Docker is all the rage right now, that’s where we’re going to start.
The Microsoft takeover of GitHub made many developers worried over their code and repositories, so much to the point they’re already migrating repositories and code from GitHub to GitLab in a massive surge.
Get THE BEST DEALS IN CLOUD HOSTING from Los Angeles!Grab a huge 32GB RAM & 320GB of SSD storage for just $109/year!
Why GitLab? It’s pretty feature-competitive with GitHub, with wiki and issue-tracking features, plus a robust web interface. Even better, it’s open source, which seems to give some of these developers more confidence in the sustainability of their GitLab-hosted code.
But it’s not a panacea—GitLab could up and disappear, or change fundamentally, or be acquired by Google or Facebook. The good news is that you can host your own GitHub-like web-based hosting service for version control using Git and Docker within minutes!
GitLab already provides a Docker image for the open source community. You can host it in your local environment as well as in the public domain and make use of it without worrying about big-time acquisitions.
If you like GitLab, you just might love Gogs, a painless way to self-host a Git service. Its lightweight web interface can be run using the official Docker image, whether as an independent service or behind a more complex self-hosting infrastructure with a reverse proxy.
Either way, nothing is stopping you from spinning up an inexpensive VPS to set up your own a Git service using Docker.
Get a $50 Bonus for 72 hours only…
To celebrate our newest datacenters in Tokyo & London, we’re offering a $50 hosting credit with any 3-year hosting plan. And a $20 Bonus with a 1-year plan. Use your bonus to add backups, discount your renewal or add a new server, super cheap. We’re shutting this one down soon, though. So get there now…
Score a 24GB Performance VPS with 240GB of SSD storage for just $99/year…PLUS a $50 Credit!)
Sounds crazy? Yes, it is.
You might have already seen how Linux users often “emulate” a Windows application inside a Linux box using WINE. You can now go even further by running a Windows application inside a container that’s running on a Linux VPS. For that, all you need is docker-wine.
I can’t guarantee it’s going to be a smooth experience, but it just might be worth an hour’s hacking.
Why would you want to do this? Well, maybe you want to run the Windows version of Skype but don’t have Windows on your local machine and don’t want to install WINE there either. One obvious benefit is that your IP address will not get leaked through Skype’s IP resolver. You can containerize other Windows applications like notepad in a Linux box without actually exposing yourself to a Windows box.
Here’s one for your local installation, not your VPS.
If you’re the kind of person who’s ever hosted or visited a LAN party, you’ve probably experienced the massive rush to download new games from Steam, Battle.net, or Origin. All of a sudden your local network is overloaded with transfer, making everything slow to a crawl.
A few developers have built Docker images that solve this problem by downloading a game’s content and caching it somewhere on the local network. Instead of a dozen gamers downloading the same game via the Internet, they can transfer it from the cached version on disk. That means you download once, transfer many times, reducing bandwidth consumption significantly.
Want to secure your online activity from surveillance and traffic analysis? Those who genuinely value their Internet privacy probably already use Tor or other tools like Privoxy to remain as anonymous as possible.
You can Dockerize both of these services with a single Docker image, which will prevent analysis of your traffic, enhance privacy by modifying HTTP headers, and remove ads or other unwanted scripts that might run on web pages. Now you can improve your security and lock down your privacy using Docker and your VPS.
5. Run ASP.NET applications on Linux
As part of Microsoft’s effort to make ASP.NET cross-platform, they released their first official Docker image for ASP.NET in 2015. As we already know, one can sandbox an application on a Linux machine using Docker. Take that idea a step further, and it’s easy to see how developers could add their ASP.NET application on top of the base image and run it in a container!
You want to tweet from your terminal using Docker? For some people, who love to use terminals and hang out in them for a considerable amount of time, it makes sense to use a terminal-based Twitter client.
The Docker-based approach will isolate the Twitter application from other applications—whenever you don’t need the Twitter client, stop the container or delete it. This will ensure that libraries and code in the host machine remain unaffected.
According to Garter, there will soon be an estimated 20 billion interconnected IoT (Internet of Things) devices such as environmental sensors, cameras, cable set-top boxes, home appliances, industrial devices and much more.
These resource-constrained IoT devices don’t need a heavier OS or VM to manage and run software to control them. Perhaps more important, many of these IoT devices move from one environment to another very quickly.
Containers and IoT devices operate in the same paradigm when it comes to deploying, updating, and maintaining, and so it makes sense for developers to use them together! You can package the IoT software and dependencies in a Docker image and deploy that to manage and run the device with less hassle.
How’s this for an example—let’s say you’ve deployed a fleet of Raspberry Pis, each performing different tasks, to many different environments. Surely it will be easier to deploy container-based applications on each of the devices and manage all of them from a single host. The good news is that there are already a few players, both big and small, who provide exactly this solution. Resin, Kontena, eliot are just a few.
Want to explore other cool ways to use Docker on your VPS? Check out the awesome-docker repository on GitHub. It’s perfect for a beginner who’s just trying to make their first foray into the world of container technology.
Also, don’t forget to read the “cool uses for Docker” post that started this trend on this very blog!