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

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