- Turn Windows features on or off
- Enable:
- Windows Subsystem for Linux (WSL)
- Virtual Machine Platform
wsl --update
# update all packages
apk update
apk upgrade
# update version if required
sed -i -e 's/3.15/3.16/g' /etc/apk/repositories
sed -i -e 's/3.15/latest-stable/g' /etc/apk/repositories
apk update
apk upgrade --available && sync
# then reboot
# warning, docker-compose is v1
# docker-compose-cli is v2
apk add docker docker-cli-compose
# custom profile
cat <<EOF > /etc/profile.d/profile.sh
alias ls="ls -Ah --color=auto"
alias ll="ls -l"
alias goproject="cd /mnt/c/Users/carbon/projects"
if [ ! -e /var/run/docker.sock ]; then
echo "(i) Docker is running"
dockerd &> /tmp/dockerd.log &
else
echo "(i) Docker is already running"
fi
export DOCKER_USER="$(id -u):$(id -g)"
goproject
EOF
source /etc/profile.d/profile.sh
WIP... Podman not really 1:1 to Docker
# podman alternative
apk add podman
ln -s $(which podman) /usr/local/bin/docker