Docker

How to Install Docker on Alpine Linux

Docker is a top-rated open-source containerization platform to run the virtualized lightweight machines without hassle. It has containers that are lightweight, unlike virtual machines that ship with all the files, dependencies, and libraries that needed to run.

Alpine Linux is known for its performance, security, and lightweight features. It is used to build the containers using various images which are available on the Docker Hub. However, you must install Docker to perform the various tasks in your system. In this short guide, we will show how to install Docker on Alpine Linux by following a few steps.

How to Install Docker on Alpine Linux

1. First of all, refresh the cache repository and install the latest one by running the following command:

su
apk update
apk upgrade

2. Docker packages come pre-installed in the Alpine Linux repository, so you don’t need to add and do anything extra to it. Install the required package to install Docker using the apk manager.

apk add docker

The previous command adds the packages, dependencies, etc., associated with Docker and installs Docker in the system.

3. By default, Docker does not start automatically. Hence, it must be manually invoked after each boot through this command:

rc-update add docker boot

4. Start Docker with the help of the following command:

service docker start

5. Moreover, you can check the Docker version that is installed in your system:

docker version

As you can see, the output of the previous command gives you the information like docker, Go and API version, etc.

6. You can check that the Docker that is installed by you is working properly by running the following command:

docker ps

If your output is similar to the previous image, your Docker is working properly.

Conclusion

This is all you need to know to install Docker on Alpine Linux. Although Docker already comes in Alpine Linux, you must install it to work on it. Docker is an amazing tool that can make it easier for users to develop and run the applications through containers. If you are a developer, install Docker on your Alpine Linux machine.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.