aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--amd64-nomultilib/Dockerfile24
-rwxr-xr-xamd64-nomultilib/build.sh29
-rw-r--r--docs/README.md2
-rw-r--r--portage/Dockerfile2
5 files changed, 59 insertions, 2 deletions
diff --git a/README.md b/README.md
index 89b8898..856ff60 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,10 @@ These images are intended to be created automatically by
[docker hub](https://hub.docker.com/u/gentoo/dashboard/) and include basic
stage3 images and an image usable as a `/usr/portage` volume.
+# DockerHub
+
+https://registry.hub.docker.com/u/gentoo/stage3-amd64/
+
## Inventory
* portage
diff --git a/amd64-nomultilib/Dockerfile b/amd64-nomultilib/Dockerfile
new file mode 100644
index 0000000..3fb7d92
--- /dev/null
+++ b/amd64-nomultilib/Dockerfile
@@ -0,0 +1,24 @@
+FROM busybox
+
+MAINTAINER Gentoo Docker Team
+
+# This one should be present by running the build.sh script
+ADD build.sh /
+
+RUN /build.sh amd64 x86_64 -nomultilib
+
+# Setup the (virtually) current runlevel
+RUN echo "default" > /run/openrc/softlevel
+
+# Setup the rc_sys
+RUN sed -e 's/#rc_sys=""/rc_sys="lxc"/g' -i /etc/rc.conf
+
+# Setup the net.lo runlevel
+RUN ln -s /etc/init.d/net.lo /run/openrc/started/net.lo
+
+# Setup the net.eth0 runlevel
+RUN ln -s /etc/init.d/net.lo /etc/init.d/net.eth0
+RUN ln -s /etc/init.d/net.eth0 /run/openrc/started/net.eth0
+
+# By default, UTC system
+RUN echo 'UTC' > /etc/timezone
diff --git a/amd64-nomultilib/build.sh b/amd64-nomultilib/build.sh
new file mode 100755
index 0000000..ade04b8
--- /dev/null
+++ b/amd64-nomultilib/build.sh
@@ -0,0 +1,29 @@
+suffix=$3 # e.g. -nomultilib
+arch=$1
+busybox_version=$2
+dist="http://distfiles.gentoo.org/releases/${arch}/autobuilds/"
+stage3="$(wget -q -O- ${dist}/latest-stage3-${arch}${suffix}.txt | tail -n 1 | cut -f 1 -d ' ')"
+
+mkdir newWorldOrder; cd newWorldOrder
+echo "Downloading and extracting ${stage3}..."
+wget -q -c "${dist}/${stage3}"
+bunzip2 -c $(basename ${stage3}) | tar --exclude "./etc/hosts" --exclude "./sys/*" -xf -
+rm -f $(basename ${stage3})
+wget -q -O /busybox "http://www.busybox.net/downloads/binaries/latest/busybox-${busybox_version}"
+chmod +x /busybox
+/busybox rm -rf /lib* /usr /var /bin /sbin /opt /mnt /media /root /home /run /tmp
+/busybox cp -fRap lib* /
+/busybox cp -fRap bin boot home media mnt opt root run sbin tmp usr var /
+/busybox cp -fRap etc/* /etc/
+cd /
+#commit suicide
+/busybox rm -rf newWorldOrder /busybox /build.sh /linuxrc
+
+latest_stage3=$(curl "${base_url}/latest-stage3-amd64-nomultilib.txt" 2>/dev/null | grep -v '#' | awk '{print $1}')
+stage3=$(basename "${latest_stage3}")
+
+# Self destruct
+rm -f /Dockerfile /build.sh
+
+echo "Bootstrapped ${stage3} into /:"
+ls --color -lah
diff --git a/docs/README.md b/docs/README.md
index cb55ae2..65d71b5 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -58,7 +58,7 @@ Support for older versions (down to 1.0) is provided on a best-effort basis.
If you have any problems with or questions about this image, please contact us through a [GitHub issue](https://github.com/gentoo/gentoo-docker-images/issues).
-You can also reach many of the official image maintainers via the `#gentoo-contain` IRC channel on [Freenode](https://freenode.net).
+You can also reach many of the official image maintainers via the `#gentoo-containers` IRC channel on [Freenode](https://freenode.net).
## Contributing
diff --git a/portage/Dockerfile b/portage/Dockerfile
index a341a02..827fd58 100644
--- a/portage/Dockerfile
+++ b/portage/Dockerfile
@@ -5,4 +5,4 @@ ADD http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2 /
RUN mkdir -p /usr
RUN bzcat /portage-latest.tar.bz2 | tar -xf - -C /usr
-RUN mkdir -p /usr/portage/{distfiles,metadata,packages}
+RUN mkdir -p /usr/portage/distfiles /usr/portage/metadata /usr/portage/packages