Software Development

So You Want To Be a Software Developer?: Docker and the ‘It works on my machine’ problem

Full-stack developer Jason Anton gives a quick breakdown on the utility and commands of Docker.

So you designed an app on iPhone, but it’s buggy on Android and you don’t know what to do. Docker is the tool to alleviate this major headache of software development.

Docker is a container system that works as its own small virtual machine, and doesn’t take too much computer processing power. The program is an equalizer. The containers run the same way on any operating system because the code operates within the container.

Docker is to developing applications what a number two pencil is to the Scantron in a standardized test. In those familiar grade school test, if one person was using a lead pencil, the other was using a pen and the other has quill plucked from an eagle dipped in ink they microbrew in their basement, there would be errors in registering the answers. But with the right tool, the machine can process everything correctly.

Docker was used in the creation of Code for Baltimore’s Bmore Responsive application. The backend code is behind a customer management tool used by the Baltimore City Health Department to contact senior living facilities during the Covid-19 pandemic.

This backend code can also be applied and tailored to different applications that service different needs and functions in other cities and departments, and Docker is the reason. It normalizes development and production environments, creating scalable solutions to software development issues.

Code for Baltimore also has a breakdown for quick start on its GitHub.

A docker container. (Courtesy of Jason Anton)

To illustrate the commands, Jason Anton, a full-stack developer with Owings Mills-based software firm Bellese Technologies and project lead for Code for Baltimore provided examples of commands in Docker.

Each gif below shows a command in the typical workflow in Docker after making changes to code or if you’re testing finished code in different operating systems. The commands are for running code during the testing and development phase in an operating system- neutral environment.

docker ps

This will show you currently running containers.

(Courtesy of Jason Anton)

 

 

 

 

 

 

 

 

 

 

docker-compose up

This will bring up your containers defined in the docker-compose.yml file.

(Courtesy photo Jason Anton)

 

 

 

 

 

 

 

 

 

docker-compose down

This will bring down your containers from that docker-compose file.

(Courtesy of Jason Anton)

 

 

 

 

 

 

 

 

 

docker prune

This deletes all containers, volumes, and networks from your system.

(Courtesy of Jason Anton)

 

 

 

 

 

 

 

 

 

 

In software development circles, “It works on my machine” defense is infamous. A system may work on a developer’s system, but not on others who have different environments.

Docker is the tool Anton recommends to completely remove the “it works on my machine” issue from your software development project.

Read the first edition of ‘So You Want to be a Software Developer: Version control

Donte Kirby is a 2020-2022 corps member for Report for America, an initiative of The Groundtruth Project that pairs young journalists with local newsrooms. This position is supported by the Robert W. Deutsch Foundation.

Before you go...

Please consider supporting Technical.ly to keep our independent journalism strong. Unlike most business-focused media outlets, we don’t have a paywall. Instead, we count on your personal and organizational support.

Our services Preferred partners The journalism fund
Engagement

Join our growing Slack community

Join 5,000 tech professionals and entrepreneurs in our community Slack today!

Trending

The person charged in the UnitedHealthcare CEO shooting had a ton of tech connections

From rejection to innovation: How I built a tool to beat AI hiring algorithms at their own game

Where are the country’s most vibrant tech and startup communities?

The looming TikTok ban doesn’t strike financial fear into the hearts of creators — it’s community they’re worried about

Technically Media