Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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:

  $ docker exec -ti mycontainer /bin/bash
  stat /bin/bash: no such file or directory
  $ docker exec -ti mycontainer /bin/sh
  / # curl https://localhost:5000/
  /bin/sh: curl: not found
  / # strace $command
  /bin/sh: strace: not found


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 packages


Hitting 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.


Well yeah, "break down" was probably too much of a term. I did not mean to diss Alpine; I just meant to point out that the downsides of minimal images should be carefully considered.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: