[coreboot-gerrit] Change in coreboot[master]: util/docker: Update coreboot-jenkins-node dockerfile

Martin Roth (Code Review) gerrit at coreboot.org
Fri Jul 13 05:52:05 CEST 2018


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/27470


Change subject: util/docker: Update coreboot-jenkins-node dockerfile
......................................................................

util/docker: Update coreboot-jenkins-node dockerfile

Because earlier versions of debian set /dev as a standard tmpfs
filesystem, that was a simple place to build.  Now, this has been
changed and /dev isn't a standard tmpfs that will grow to 50% of
memory.  It's a fixed, very small size, and can no longer even be
resized.
Because of this, create a new directory to build in and add it to
/etc/fstab.  Mount it when the container is started.

As long as we're at it, make the other build directories tmpfs as well.
The builders we're using now have plenty of memory, so don't write any
of the files to disk.

Change-Id: I21fd2c4395d7ffb9428172f035991338658cd907
Signed-off-by: Martin Roth <gaumless at gmail.com>
---
M util/docker/coreboot-jenkins-node/Dockerfile
1 file changed, 15 insertions(+), 4 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/70/27470/1

diff --git a/util/docker/coreboot-jenkins-node/Dockerfile b/util/docker/coreboot-jenkins-node/Dockerfile
index 230842c..763d473 100644
--- a/util/docker/coreboot-jenkins-node/Dockerfile
+++ b/util/docker/coreboot-jenkins-node/Dockerfile
@@ -17,9 +17,6 @@
 MAINTAINER Martin Roth <martin at coreboot.org>
 USER root
 
-# Check to make sure /dev is a tmpfs file system
-RUN mount | grep "on /dev type tmpfs" > /dev/null || exit 1
-
 RUN apt-get -y update && \
 	apt-get -y install \
 	lua5.3 liblua5.3-dev openjdk-8-jre-headless openssh-server && \
@@ -37,6 +34,17 @@
 	chmod 0755 /var/run/sshd && \
 	/usr/bin/ssh-keygen -A
 
+# Create /cb-build as a tmpfs directory to build in
+RUN mkdir /cb-build && \
+	chown coreboot:coreboot /cb-build && \
+	echo "tmpfs /cb-build tmpfs rw,mode=1777 0 0" > /etc/fstab && \
+	mkdir -p /home/coreboot/slave-root/workspace && \
+	chown -R coreboot:coreboot /home/coreboot/slave-root && \
+	echo "tmpfs /home/coreboot/slave-root/workspace tmpfs rw,mode=1777 0 0" >> /etc/fstab && \
+	mkdir /home/coreboot/.ccache_tmpfs && \
+	chown coreboot:coreboot /home/coreboot/.ccache_tmpfs && \
+	echo "tmpfs /home/coreboot/.ccache_tmpfs tmpfs rw,mode=1777 0 0" >> /etc/fstab
+
 # Build encapsulate tool
 ADD https://raw.githubusercontent.com/pgeorgi/encapsulate/master/encapsulate.c /tmp/encapsulate.c
 RUN gcc -o /usr/sbin/encapsulate /tmp/encapsulate.c && \
@@ -44,6 +52,9 @@
 	chmod +s /usr/sbin/encapsulate
 
 VOLUME /data/cache
-ENTRYPOINT mkdir /dev/cb-build && chown coreboot /dev/cb-build && /usr/sbin/sshd -p 49151 -D
+ENTRYPOINT mount /cb-build && \
+	mount /home/coreboot/slave-root/workspace && \
+	mount /home/coreboot/.ccache_tmpfs && \
+	/usr/sbin/sshd -p 49151 -D
 EXPOSE 49151
 ENV PATH $PATH:/usr/sbin

-- 
To view, visit https://review.coreboot.org/27470
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I21fd2c4395d7ffb9428172f035991338658cd907
Gerrit-Change-Number: 27470
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180713/ab092baa/attachment.html>


More information about the coreboot-gerrit mailing list