[arch-general] Best practices for creating an Arch Docker image
Good evening to everybody, I got interested in Docker lately and I've decided to create an ArchLinux image for it. There's one suggested from the ArchWiki (*base/archlinux*) but I wanted to learn from scratch. So, I've then some questions: 1. As the root filesystem, I've made a repacked version of the bootstrap tarball. Even though it is not so clean, it works and it is easy peasy to do. Should I go still for a `pacstrap`? 2. Theorically, one step of the Dockerfile should be installing the whole 'base' group, which includes also the kernel, which is not really needed in a container. So this questions splits up in 2 parts: - which packages I can ignore of the 'base' group? - which packages present in the bootstrap OS can be removed? This is because I think the Docker image should contain only the least number of packages of an Arch system; ideally, *pacman* and the needed core utils. 3. I'm having a GPGME error with the i686 tarball... Upgrading GPGME breaks pacman, upgrading pacman does the same. If someone is interested in helping me, I would be glad to share the Dockerfile. A first working code is here: https://github.com/ItachiSan/dockerfiles -- Giovanni Santini My blog: http://giovannisantini.tk My code: https://git{hub,lab}.com/ItachiSan My GPG: 2FADEBF5
On 04/27/17 at 07:52pm, Giovanni Santini via arch-general wrote:
Good evening to everybody, I got interested in Docker lately and I've decided to create an ArchLinux image for it. There's one suggested from the ArchWiki (*base/archlinux*) but I wanted to learn from scratch.
Just FYI, we hope to provide an official Arch Linux docker image soon (tm) -- Jelle van der Waa
2017-04-27 20:07 GMT+02:00 Jelle van der Waa <jelle@vdwaa.nl>:
On 04/27/17 at 07:52pm, Giovanni Santini via arch-general wrote:
Good evening to everybody, I got interested in Docker lately and I've decided to create an ArchLinux image for it. There's one suggested from the ArchWiki (*base/archlinux*) but I wanted to learn from scratch.
Just FYI, we hope to provide an official Arch Linux docker image soon (tm)
Hi! I maintain a base Archlinux image for doker here https://hub.docker.com/r/ogarcia/archlinux/ I updated it every month. If you are insterested in vagrant image, https://atlas.hashicorp.com/ogarcia/boxes/archlinux-x64 for 64bit and https://atlas.hashicorp.com/ogarcia/boxes/archlinux-x32 for 32bit. Greetings. -- Óscar García Amor | ogarcia at moire.org | http://ogarcia.me
On Thu, Apr 27, 2017 at 1:52 PM, Giovanni Santini via arch-general <arch-general@archlinux.org> wrote:
Good evening to everybody, I got interested in Docker lately and I've decided to create an ArchLinux image for it. There's one suggested from the ArchWiki (*base/archlinux*) but I wanted to learn from scratch. So, I've then some questions:
1. As the root filesystem, I've made a repacked version of the bootstrap tarball. Even though it is not so clean, it works and it is easy peasy to do. Should I go still for a `pacstrap`? 2. Theorically, one step of the Dockerfile should be installing the whole 'base' group, which includes also the kernel, which is not really needed in a container. So this questions splits up in 2 parts: - which packages I can ignore of the 'base' group? - which packages present in the bootstrap OS can be removed? This is because I think the Docker image should contain only the least number of packages of an Arch system; ideally, *pacman* and the needed core utils. 3. I'm having a GPGME error with the i686 tarball... Upgrading GPGME breaks pacman, upgrading pacman does the same. If someone is interested in helping me, I would be glad to share the Dockerfile.
A first working code is here: https://github.com/ItachiSan/dockerfiles
There is a script in the moby repo that might be a good starting place (it's what I've used for building Archlinux docker images). See https://github.com/moby/moby/blob/master/contrib/mkimage-arch.sh, and https://github.com/IQSS/iqss-jupyter-notebook for the notes I wrote last time I did it. --Ista
-- Giovanni Santini My blog: http://giovannisantini.tk My code: https://git{hub,lab}.com/ItachiSan My GPG: 2FADEBF5
I've been maintaining minimal and hardened Arch images and container configurations for several years now that are updated regularly [1]. All my images are based on the image `nfnty/arch-mini` [2] which has been made to be as minimal and automated as possible. It is built from scratch using a bootstrap archive that is built inside another container using the image `nfnty/arch-bootstrap` [3]. The bootstrap archive can be built outside of the container using the same script [4] as the image does. You can find many of my images with automated builds on Docker Hub [5]. //nfnty [1] https://github.com/nfnty/dockerfiles [2] https://github.com/nfnty/dockerfiles/tree/master/images/arch-mini/latest [3] https://github.com/nfnty/dockerfiles/tree/master/images/arch-bootstrap/lates... [4] https://github.com/nfnty/dockerfiles/blob/master/images/arch-bootstrap/lates... [5] https://hub.docker.com/u/nfnty On 2017-04-27 19:52, Giovanni Santini via arch-general wrote:
Good evening to everybody, I got interested in Docker lately and I've decided to create an ArchLinux image for it. There's one suggested from the ArchWiki (*base/archlinux*) but I wanted to learn from scratch. So, I've then some questions:
1. As the root filesystem, I've made a repacked version of the bootstrap tarball. Even though it is not so clean, it works and it is easy peasy to do. Should I go still for a `pacstrap`? 2. Theorically, one step of the Dockerfile should be installing the whole 'base' group, which includes also the kernel, which is not really needed in a container. So this questions splits up in 2 parts: - which packages I can ignore of the 'base' group? - which packages present in the bootstrap OS can be removed? This is because I think the Docker image should contain only the least number of packages of an Arch system; ideally, *pacman* and the needed core utils. 3. I'm having a GPGME error with the i686 tarball... Upgrading GPGME breaks pacman, upgrading pacman does the same. If someone is interested in helping me, I would be glad to share the Dockerfile.
A first working code is here: https://github.com/ItachiSan/dockerfiles
Il 28/04/2017 07:23, nfnty via arch-general ha scritto:
I've been maintaining minimal and hardened Arch images and container configurations for several years now that are updated regularly [1].
All my images are based on the image `nfnty/arch-mini` [2] which has been made to be as minimal and automated as possible. It is built from scratch using a bootstrap archive that is built inside another container using the image `nfnty/arch-bootstrap` [3]. The bootstrap archive can be built outside of the container using the same script [4] as the image does.
You can find many of my images with automated builds on Docker Hub [5].
//nfnty
[1] https://github.com/nfnty/dockerfiles [2] https://github.com/nfnty/dockerfiles/tree/master/images/arch-mini/latest [3] https://github.com/nfnty/dockerfiles/tree/master/images/arch-bootstrap/lates...
[4] https://github.com/nfnty/dockerfiles/blob/master/images/arch-bootstrap/lates...
Thank you a lot for your feedback. :) Hope to see the official image soon on Docker Hub. Cheers! -- Giovanni Santini My blog: http://giovannisantini.tk My code: https://git{hub,lab}.com/ItachiSan My GPG: 2FADEBF5
participants (5)
-
Giovanni Santini
-
Ista Zahn
-
Jelle van der Waa
-
nfnty
-
Óscar García Amor