Start using our Holiday API
Use our Holiday data in your applications programmatically. No credit card is required to start.
As part of our Enterprise subscription for Global Holiday Data we use Docker and Docker Compose for our enterprise deployment. This is mostly for clients that need PCI and HIPAA compliance.
This workflow allows them to run our products within their own infrastructure. We will be going over the setup and also plan on making some of our scripts and configuration open source soon.
So, with the new version of Ubuntu available, Ubuntu 20.04, we wanted to write a little tutorial about setting up Docker and Docker compose on it. Ubuntu 20.04 is available to download now and you can use it to experience its new additions, themes (if you are using the desktop version) and other features.
One of the really cool things about this version of Ubuntu is that we don’t need to add any third-party repository to install and start with Docker, just one command and everything is good to go.
If this is the first time you are hearing about docker we want to help you out. Docker is a platform and a collection of tools that enables users to run applications in isolated environments called containers.
These containers, however, can build on one another and can communicate with each other. Essentially, these containers are nothing but virtual machines, slightly different from our standard one which we create on Virtual Box like platforms.
All the containers share a common kernel that means whatever Linux operating system or application we are going to install, we don’t need to import all of its data thus light image and fast performance of the containers.
Therefore, if we want to separate the web server from the database server, we would have to start two complete virtual machines including the operating system in the standard virtualization. But in Docker, these are simply two independent containers that start the respective servers without the need of full-fledged operating system installation.
It is cross-platform and the distribution of the Docker container images takes place via the Docker Hub. We can easily create a so-called image from a fully configured container and upload it to the central Docker Hub.
To make sure, all the repositories and installed packages are up to date just run a simple updater command for that, also make sure you have root access for all the commands we are going to run here.
sudo apt install
On earlier versions of Ubuntu such as 18.04, we have to install a couple of dependencies manually including its repository. However, in Ubuntu 20.04, we don’t have to do anything, everything is there in the official repository of the system. What we have to do is the issuing of just one single Docker installation command and that’s it. Here is the that:
sudo apt install docker-compose
Below is the output you get, then you can just press ‘y’ to start the install
calendarific-test@calendarific-dt-1:~$ sudo apt install docker-compose Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: bridge-utils cgroupfs-mount containerd docker.io pigz python3-attr python3-cached-property python3-distutils python3-docker python3-dockerpty python3-docopt python3-importlib-metadata python3-jsonschema python3-lib2to3 python3-more-itertools python3-pyrsistent python3-setuptools python3-texttable python3-websocket python3-zipp runc ubuntu-fan Suggested packages: ifupdown aufs-tools btrfs-progs debootstrap docker-doc rinse zfs-fuse | zfsutils python-attr-doc python-jsonschema-doc python-setuptools-doc The following NEW packages will be installed: bridge-utils cgroupfs-mount containerd docker-compose docker.io pigz python3-attr python3-cached-property python3-distutils python3-docker python3-dockerpty python3-docopt python3-importlib-metadata python3-jsonschema python3-lib2to3 python3-more-itertools python3-pyrsistent python3-setuptools python3-texttable python3-websocket python3-zipp runc ubuntu-fan 0 upgraded, 23 newly installed, 0 to remove and 6 not upgraded. Need to get 70.3 MB of archives. After this operation, 339 MB of additional disk space will be used. Do you want to continue? [Y/n]
Once the command is done you have successfully installed docker. You can now test it out by using the to run the ‘Hello World’ image.
docker run hello-world
Now to install Docker Compose.
curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
We are using the latest stable version which is 1.25.4. You should always check for the most recent version of the install on the releases page on GitHub. Verify the installation by running the following command which will display the Compose version:
So, this was the simple tutorial on the installation of Docker and Docker Compose on Ubuntu 20.04 Focal Fossa, if you have a question, please free to comment.