2017. szeptember 19., kedd

Alpine Linux install

If you start working on Docker these days it is inevitable to run into Alpine Linux at certain point. It offers 1/10 of the size of a Debian based container (5 mb vs 50 mb), and many application stacks already offer Alpine based image to derive your micro services from. Debian can be slimmed down pretty well and there is a loyal following using it for containers and servers as well.
To try it out I decided to build a VM based on Alpine so I can evaluate it as a container image base.
Adventures in the Alpines so far:
  1. There is a pretty good starting guide, with some caveats:
    1. use bridged connection instead of nat if you want to see your vm from your host/other machines in the network, and performs better too
    2. use the latest-stable url to enable community repository, otherwise you could get some ugly kernel incompatibility errors
  2. Minimalist samba install (loosely based on this wiki page)
    1. apk add samba
    2. mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
    3. nano /etc/samba/smb.conf
    4. Enter the above to the text editor, save and exit
[global]
workgroup = WORKGROUP
netbios name = server1
security = user
map to guest = Bad User
dns proxy = no
  1. Start/enable service
    1. rc-update add samba
    2. rc-service samba start
  2. Enable ssh access
    1. nano /etc/ssh/sshd_config
    2. #PermitRootLogin prohibit-password => PermitRootLogin yes
    3. rc-service sshd restart
  3. Docker install is fairly simple
    1. apk add docker
    2. rc-update add docker boot
    3. rc-service docker start
  4. Some other utilities to install:
    1. apk add git
    2. apk add nodejs

Nincsenek megjegyzések:

Megjegyzés küldése