Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Docker Images Best Practices

Docker Images Best Practices

We talked about the best practices when working with docker images

Boris Quiroz

July 08, 2016

Transcript

11 slides
  1. Containers son a las VMs lo que los threads son

    a los procesos. Powerful chroot.
  2. Buenas prácticas Usar cache: FROM alpine:edge Usar tags: docker build

    -t boris/parrots . Exponer puertos: EXPOSE 1313 CMD || ENTRYPOINT: ENTRYPOINT ["/root/terminal-parrot/parrot"]
  3. Imagenes grandes se demoran más en bajar. Imágenes grandes usan

    más espacio. Componentes innecesarios aumentan el tamaño. En debian: --no-install-recommends y rm -rf /var/lib/apt/lists/* En Alpine: rm -rf /var/cache/apk/* Busybox Alpine Node PHP Ubuntu 6.1 5.9 1:21 50.3 23.9 Busybox Alpine Node PHP Ubuntu 1.093 MB 4.799 MB 660.7 MB 490.3 MB 132.8 MB

More Decks by Boris Quiroz

Other Decks in Technology