Listing here few usefull commands for Alpine Linux.
1. Assign Static Ip Address:
Code: Select all
auto eth0
iface eth0 inet static
address 192.168.0.25
subnet 255.255.255.0
gateway 192.168.0.1
Code: Select all
# after the virtual disk has already been expanded.
apk add --no-cache cfdisk e2fsprogs-extra
# choose partition then "Resize" > "Write" (to finalize)
cfdisk
# replace * with partition you are resizing
resize2fs /dev/*
Code: Select all
$ cat /dev/zero > zero.file
cat: write error: No space left on device
$ sync
$ rm zero.file
$ sync
Code: Select all
vboxmanage modifymedium --compact /path/to/thedisk.vdi
Code: Select all
mkdir -p /mnt/shared
apk add virtualbox-guest-additions linux-virt
reboot
Code: Select all
modprobe -a vboxsf
mount -t vboxsf vbox_shared /mnt/shared
5. Sometime host machine dont have internet. To install docker one can pull in a machine with internet and export this image with docker save command. Then compress it and load it with host having no internet with docker load command. The code is:
In machine with internet:
Code: Select all
apk add gzip
docker pull couchbase
docker save couchbase > couchbase.tar
ls -lh couchbase.tar
gzip -9 couchbase.tar
ls -lh couchbase.tar.gz
Code: Select all
docker load < couchbase.tar.gz
Code: Select all
jupyter-notebook --allow-root --ip 0.0.0.0 --port 8888
Code: Select all
docker create -t -i -p:3000:3000 --name myubuntu ubuntu:latest
Code: Select all
docker start myubuntu
Code: Select all
docker exec -it myubuntu /bin/bash
Code: Select all
netstat -lnptu
Code: Select all
which <application_name>