Setup Alpine Standard 3.12.0 as Ansible Target - CloudCommandos/JohnChan GitHub Wiki
Default login is root without password.
Go through setup, https://wiki.alpinelinux.org/wiki/Alpine_Install:_from_a_disc_to_a_any_computer_single_only_boot
setup-alpine
Change hostname
vi /etc/hostname
my_hostname
hostname -F /etc/hostname
Configure networking
vi /etc/networking
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.3.159
netmask 255.255.255.0
gateway 192.168.3.1
auto eth1
iface eth1 inet static
address 192.168.6.159
netmask 255.255.255.0
Restart Networking
service networking restart
Add Repositories
vi /etc/apk/repositories
http://dl-3.alpinelinux.org/alpine/v3.12/main
http://dl-3.alpinelinux.org/alpine/v3.12/community
Install openssh
apk add openssh
rc-update add sshd
/etc/init.d/sshd start
The above steps will be covered within the setup-alpine
process
Update apk cache
apk update
Install sudo
apk add sudo
Add Sudoer User
echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel
adduser devops wheel
# or
adduser devops
addgroup devops wheel
Install Python3
apk add python3
Install Docker and Docker-Compose
apk add docker docker-compose
rc-update add docker boot
service docker start
# Add your user(s) to docker group if applicable
addgroup devops docker