Containers and Ships and Berths — Part 1

Ewere Diagboya
3 min readMar 22, 2017

Introduction

Now you might be waiting to hear stuffs about sailors and ocean waves and how to be a great sailor is a sea with about of turbulent.

Oh no. I have never entered a ship (hope to someday), neither have I ever been on the bridge to know what 50 knots 30 degrees south means.

Well enough of the sailor and ship stuff this ain’t “Pirates of the Caribbean”.

But in all sincerity containers where a revolutionary way for business men and merchants to package/bundle articles and items and move them in separate containers leaving the platform neat and clean. Before containers cargo has be put on the floor of the ship littering the ground and it was difficult to compartmentalize articles of different merchants and allocate spaces within the ship for different merchants and their articles.

“Before shipping containers 60–75% of the cost of transporting cargo by sea was made up of portside costs including labour, loss of time and damage (including theft) to cargo.” — source

Before shippping containers, individual goods were loaded directly onto cargo ships” — source

“A box is a box. All you need is a vessel, a berth, and a place to put the container on the ground,” says Rice. — source

Portability of cargo too by merchants when ships dock was another problem because cargo was dumped on the ship just like that

But…..

Containers were invented in 1956 by Malcolm McLean and everything changed.

Software Engineering

Now liken this to software engineering and application development. When an application is ready to be deployed or shipped either to staging or live/production environment. Before containers, a single service or machine would have a lot of versions of a code base, different versions of a development language, different versions of a database and with time it all get messed up with unnecessary files. Version tracking and logs are difficult to manage and handle overtime. Portability of application to other distributions or operating systems becomes a whole new problem, just as we mentioned in the shipping example above.

Containerization helps to install language interpreter/compiler, web server and all the dependencies your codebase needs in a minimal Linux distro (could be Alpine, Ubuntu). Then this container can be deployed and ran inside the machine as a seperate entity on its own. With this it will not mess up the host machine.

Docker which is one of the prominent containerization technologies does this in a flash. Dont confuse it for a VM (Virtual Machine) like Vagrant or Virtual Box. Docker uses the most important dependencies the Linux machine needs to run basic operation (cgroups, namespaces, LXC), which is different from a VM having all what is needed and not needed. Docker builds an image with the necessary dependencies and this image can be stored in a repository (be it private or public) or can be bundled to a tar archive, and reused at any time. Also changes made to the image can be updated be it codebase changes or addition of new dependencies

Docker containers can run on any machine that has the docker daemon installed. With the docker daemon you pull the image from the repository or unarchive the archive file to an image and run the image

Another beauty about Docker is it gives Ops team less them to find a lot of dependencies and a lot of understanding of how to deploy a code base. In an instance that you have never worked with Ruby and you are asked to deploy a Ruby on Rails application. It would take a less time build/containerizing a portable Ruby application than trial and errors on a machine, and eventually a process that is not repeatable in the long run

With the growth of Devops, Automation of Deployment Processes and Agile development, containerization will be here to stay for a while because of its flexibility and ease of us. From running a single simple docker daemon in a single machine to orchestration of load balancers and fail safe systems, and recovery from disaster; can be made faster with a containerization technology in the CI/CD pipeline

more to come when we return in Part 2

--

--