Alpine Linux is super lightweight and its easy for developer who use Docker to generate their own images using alpine as base. but for me i wanted to run some stuff via cron and for which i was not interested to install Ubuntu as those are very resource hungry.
Installing Alpine OS
Download any alpine linux alpinelinux.org/downloads - i used alpine server (extended)
Create A VM With min config in FreeNAS
Boot into VM With VNC / Serial in FreeNAS
Login as root -- No Password Required
- Select your keyboard layout. i used
- Enter Custom Hostname if required
- Select The Network Port
- Select IP Type (DHCP / Static)
- Set ROOT Password
- Set Timezone
- Follow Any Other Instructions
- for download mirror use type
fto auto select
- Install SSH Server if required
- Select The Disk you want to install in eg (sda) and set it to sys to install it
- Remove Install Media And Reboot
Thats it alpine OS is now installed in that VM.
Installing Docker In Alpine
apk add docker Docker package is available in the Community repository.
Therefore, if apk add fails because of unjustifiable constraints error,
you need to edit the
/etc/apk/repositories file to add (or comment) a line. Community repository link: dl-cdn.alpinelinux.org/alpine/latest-stable...
apk update && apk add docker again if repositories file edited
- To start the Docker daemon at boot, run
rc-update add docker boot
- Then to start the Docker daemon manually run
service docker start
Installing Docker Compose
apk add py-pip it will install Python & PIP
Since docker-compose version 1.24.0, you also need some dev dependencies:
apk add python-dev libffi-dev openssl-dev gcc libc-dev make
Then install docker-compose, run:
pip install docker-compose
👀 Wrapping Up
Do not hesitate to share your feedback
I am on Twitter varunsridharan2. Give a follow!
Follow me on Github varunsridharan, Don't miss my amazing projects! 💯