1
0
mirror of https://github.com/sjlongland/gentoo-docker-builder.git synced 2025-09-13 10:03:17 +10:00

mkimg-container: Include portage tree and overlays

This does bloat the images out a bit, but:
- it removes one variable factor from builds, namely the host's portage
  tree
- in the runtime container, you'll only be storing it once
This commit is contained in:
Stuart Longland 2017-04-23 10:41:54 +10:00
parent 19979629b8
commit b49f303833
Signed by: stuartl
GPG Key ID: F954BBBB7948D546

View File

@ -32,11 +32,15 @@ layman -a musl
emerge -evkuDN ${EMERGE_OPTS} @system @world
# Clean up old root
# Clean up root, set up new packages
for root in ${DEVROOT} ${RTROOT}; do
rm -frv ${root}
mkdir -pv ${root}/etc
tar -C /etc -cvf - portage | tar -C ${root}/etc -xvf -
mkdir ${root}
tar -C / --exclude=usr/portage/distfiles \
--exclude=usr/portage/packages \
-cf - \
etc/portage var/lib/layman usr/portage \
| tar -C ${root} -xvf -
done
ROOT=${DEVROOT} emerge ${EMERGE_OPTS} -eKuDN @system @world