How to Setup Docker On Alpine Linux
Alpine Linux makes a great docker host OS — as well as a great container OS. However docker isn’t available in Alpine's default package list, and isn’t supported by Docker's automated setup script. Here is how to get it setup:
- Add the community repo to your list of repositories.
vi /etc/apk/repositoriesand add a line like:
http://dl-cdn.alpinelinux.org/alpine/v3.12/community(insert your alpine version).
- Update your local package list:
- Install docker:
apk add docker.
- Set docker to run on boot:
rc-update add docker boot.
- Start the service:
service docker start.
- To issue docker commands as a non-root user you will need to add your user to
dockergroup. The syntax for this is a little different then most distros:
adduser jordan docker, here I am using my username
- Before the group permission can take effect you need to logout and log back in.
- All done! Try it out with