diff options
author | Jesús <heckyel@hyperbola.info> | 2021-02-17 16:14:34 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-02-17 16:14:34 -0500 |
commit | 004b0f528a3a564a10a6a626c4094a7c25dc2141 (patch) | |
tree | df9515d5af8f77b9f23f88987240f28ad30ae459 /Dockerfile | |
download | hyperbola-docker-004b0f528a3a564a10a6a626c4094a7c25dc2141.tar.lz hyperbola-docker-004b0f528a3a564a10a6a626c4094a7c25dc2141.tar.xz hyperbola-docker-004b0f528a3a564a10a6a626c4094a7c25dc2141.zip |
first commit
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f7b7590 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +FROM scratch +MAINTAINER Jesus E. + +# Set the $architecture ARG on your `docker build' command line with `--build-arg architecture=x86_64' or `i686'. +ARG architecture + +ADD bootstrap.tar.gz / + +RUN if [ "$architecture" != "x86_64" -a "$architecture" != "i686" ]; then \ + printf '\nYou need to specify the architecture with "--build-arg architecture=i686" on your\n\ + \r"docker build" command line. "x86_64" and "i686" are supported. Aborting build!\n\n'; exit 1; fi + +RUN \ + # First + pacman-key --init \ + && pacman-key --populate hyperbola \ + # Another bit of a hack, until Hyperbola bootstrap tarballs start including `sed' package, which is required by + # `rankmirrors', which comes with `pacman' package, while that one doesn't depend on `sed'. (Note to self: ask the + # Hyperbola devs about this; `locale-gen' uses `sed' too). Again, lucky it has very little deps. + && sed -i "s/^Architecture = auto$/Architecture = $architecture/" /etc/pacman.conf \ + # `locale-gen' needs `gzip' (via `localedef', which works on /usr/share/i18n/charmaps/*.gz), `paccache' needs `awk'. + # Update the system BTW. + && pacman -Su --noconfirm --noprogressbar --quiet gzip awk \ + # Remove the last leftovers of the initial dirty `haveged' install. + && paccache -r -k0 \ + && echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen \ + && locale-gen \ + && echo 'LANG=en_US.UTF-8' > /etc/locale.conf + +ENV LANG en_US.UTF-8 + +# As per https://docs.docker.com/engine/userguide/networking/default_network/configure-dns/, the /etc/hostname, +# /etc/hosts and /etc/resolv.conf should be rather left alone. |