Re:WTF is a container?
by majewsky on Monday October 17, 2016 @04:44AM
(#12723487)
Alpine containers are nice if you're just looking at size. But they break down once you `docker exec` into them to try to debug something:
[ Parent
| on HN ]
Takes about 2 seconds to fix:
$ docker run -ti alpine /bin/sh
/ # apk add --update curl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
(1/4) Installing ca-certificates (20160104-r4)
(2/4) Installing libssh2 (1.7.0-r0)
(3/4) Installing libcurl (7.50.3-r0)
(4/4) Installing curl (7.50.3-r0)
Executing busybox-1.24.2-r9.trigger
Executing ca-certificates-20160104-r4.trigger
OK: 6 MiB in 15 packagesHitting dl-cdn.alpinelinux.org repeatedly for simple things is probably not nice. Is there an easy way to have a local alpine mirror?
I'm not suggesting this would be done repeatedly. Just when you need to debug something.
Nonetheless: https://wiki.alpinelinux.org/wiki/How_to_setup_a_Alpine_Linu...
Thats not really broken. It is just a minimal image. If you want more pacakages then install them via the Dockerfile before you fire up the image. I like starting with a bare container. For example I might take an alpine image, install openvpn and use it to serve an always on vpn connection to other containers. The VPN container doesnt need a shell or anything else really. The only thing I want to see when I attach to the container is what openvpn is spitting out.