Alpine Linux 網站首頁注明“Small!Simple!Secure!Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.”概括了以下特點:
1、小巧:基于Musl libc和busybox,和busybox一樣小巧,最小的Docker鏡像隻有5MB;
2、安全:面向安全的輕量發行版;
3、簡單:提供APK包管理工具,軟體的搜尋、安裝、删除、更新都非常友善。
4、适合容器使用:由于小巧、功能完備,非常适合作為容器的基礎鏡像。
在這裡我們用這個合适的系統進行docker容器的制作,以下是dockerfile
FROM alpine
MAINTAINER don
RUN apk --update add nginx
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx","-g","daemon off;"]
然後就可以看到了一個占用空間極小的小容器了。