All notes

For docker

Edit /etc/apk/repositories,然后在文件的最顶端添加(注意将3.3换成需要的版本).

FROM alpine:3.2
RUN apk -U add dnsmasq
EXPOSE 53 53/udp
ENTRYPOINT ["dnsmasq", "-k"]

cat /etc/alpine-release
# 3.3.0

Alpine sucks for Docker

Python alpine linux sucks for hosting docker containers.

node immediately exited with a Segmentation Fault.
this is happening because Alpine doesn’t use GlibC but rather uses Musl so a lot of things need recompiling – switching to a glibc based Alpine will do the trick.

Alpine also sucks for Python: wcfNote: use ubuntu instead as base.


__vfprintf_chk: symbol not found. "therubyracer" does not support Alpine yet. Solution: switch to ruby:2.3.1-slim.


##### Update the Package list
# The command downloads the APKINDEX.tar.gz from each repository and stores it in the local cache, typically /var/cache/apk/, /var/lib/apk/ or /etc/apk/cache/.
apk update

# Add
apk add -U openssh
apk add --allow-untrusted /path/to/file.apk
apk add packagename=1.2.3-suffix
apk add 'packagename<1.2.3-suffix'

# Remove package
apk del openssh

# To list all packages available, along with their descriptions:
apk search -v
# To list all packages are part of the ACF system:
apk search -v 'acf*'

# If you have the package installed
apk info --who-owns /with/th/full/path

##### Listing installed packages
# To list all installed packages, use:
apk info
# To list all installed packages in alphabetical order, with a description of each, do:
apk -vv info|sort

##### Update / Upgrade

# To upgrade all the packages of a running system, use upgrade:
apk -U upgrade
# To upgrade only a few packages, use the add command with the -u or --upgrade option:
apk update
apk add -u busybox


General how to get regular stuff working.

# Funny characters at the console
# Edit the file at /etc/rc.conf and change line 92 to:
# unicode="YES"

# man
apk add man THE_COMMAND_NAME-doc

# For: ag
apk add the_silver_searcher the_silver_searcher-doc

# Bash
apk add bash bash-doc bash-completion

# Shell utilities (things like grep, awk, ls are all busybox symlinks)
apk add util-linux pciutils usbutils coreutils binutils findutils grep

# /etc/{shadow,group} manipulation requires
apk add shadow

# Disk Management
apk add udisks2 udisks2-doc
# See the mounted disks
udisksctl status

Build packages

apk add -U build-base
# Smaller choice.

apk add -U alpine-sdk
# It contains: sudo, openssl, curl, abuild, g++, make, etc.

Build uwsgi

apk add -U g++ linux-headers python3-dev
pip install uwsgi