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.

3 ways to support our work:
  • Contribute to the Journalism Fund. Charitable giving ensures our information remains free and accessible for residents to discover workforce programs and entrepreneurship pathways. This includes philanthropic grants and individual tax-deductible donations from readers like you.
  • Use our Preferred Partners. Our directory of vetted providers offers high-quality recommendations for services our readers need, and each referral supports our journalism.
  • Use our services. If you need entrepreneurs and tech leaders to buy your services, are seeking technologists to hire or want more professionals to know about your ecosystem, Technical.ly has the biggest and most engaged audience in the mid-Atlantic. We help companies tell their stories and answer big questions to meet and serve our community.
The journalism fund Preferred partners Our services
Engagement

Join our growing Slack community

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

Trending

What actually is the 'creator economy'? Here's why we should care

Skills, not schools: A new path for government tech

Meet Baltimore's winners in the 2024 Technical.ly Awards

A community survives the blows: Baltimore tech and entrepreneurship’s top 2024 stories

Technically Media