Docker: have a Ubuntu development machine within seconds, from Windows or Mac

⚡️Hudson Ⓜ️endes
5 min readApr 16, 2017

Much faster than any Virtual Machine, Docker allows you to run a Ubuntu image and gain interactive access to its shell, so you can have _all_ your dependencies in an isolated Linux environment and develop from your favourite IDE, anywhere.

Introduction

Setting up development environments is often a pain in the neck.

Package management has come a long way, but it can only do so much considering the diversity of dependencies commonly in use.

If you are on Windows and need some Linux features, even worse! You will have to emulate bash (or facing the OverlayFS problems dealing with NTFS on the Windows Bash).

Either way, nothing is better than being inside a REAL LINUX ENVIRONMENT, with all required dependencies installed into it.

The alternative, would be Virtual Machines. The slow virtual machines. Vagrant has done a good job automating their setup. But they are so slow, and so heavy, very much because of their architecture, it’s true.

But we have to suffer no longer. Docker can give you free-of-charge an instantaneous Linux Development Environment (after base layers are downloaded), and I will show you how its done here!

Starting simple: Instantaneous Ubuntu, in case you are on Windows or Mac

In this first part, I will get familiar with the basis of working with an interactive docker container.

This is the very ground level knowledge on how using Docker as a user environment, rather than a standalone container with an app running in it, and very important to what we are going to do here.

Running the Ubuntu Machine

The Docker Support for Windows has already been out there for a while and and it’s pretty good. If you haven’t yet downloaded it, it’s time to do so.

Run the command:

docker run -t -i ubuntu /bin/bash

Either if you are on Windows or Mac, you will see something rather familiar:

root@50afd5fb7cc5:/#
⚡️Hudson Ⓜ️endes

⚡️Staff AI/ML Engineer & Senior Engineering Manager, #NLP, opinions are my own. https://linkedin.com/in/hudsonmendes