CoreOS is a lightweight OS with docker. Here is how to install it on qemu-kvm, aka Virtual Machine Manager.
Download the CoreOS iso, create a new VM at least 2G ram, boot the VM.
Reset the password for core user, ssh to the machine, create a install.yaml file
#cloud-config ssh_authorized_keys: - ssh-ed25519 AAAA…
Install coreos to disk with the following command:
sudo coreos-install -d /dev/sda -C stable -c /home/core/install.yaml
Poweoff the vm. Remove the iso image and update the boot order. Boot the VM, ssh to it with your ssh key. DockerCE is pre-installed in the stable channel.
▶ ssh [email protected] Warning: Permanently added '192.168.86.200' (ECDSA) to the list of known hosts. Container Linux by CoreOS stable (2303.3.0) [email protected] ~ $ docker --version Docker version 18.06.3-ce, build d7080c1
By default, coreos gets IP from DHCP. To setup static IP, ssh to the machine and create the following file
# /etc/systemd/network/static.network [Match] Name=ens3 [Network] Address=192.168.2.22/24 Gateway=192.168.2.1 DNS=192.168.2.53
Then run systemctl restart systemd-networkd to restart networking.
Now let’s deploy our first container on coreos. My favorite image is etherpad. The following will get etherpad up and running in less than a minute.
coretest ~ # docker pull etherpad/etherpad coretest ~ # docker run --name etherpad -e ADMIN_PASSWORD='this-is-a-test' -p80:9001 -d --restart=always etherpad/etherpad
The password provided to you during provisioning is meant for the core user, not root.
Their image is outdated. Not to worry, it can be easily updated with the following commands
systemctl unmask update-engine systemctl start update-engine update_engine_client -update reboot
227 total views, 2 views today