Browse Source

Might actually be working?

Rob Austein 6 years ago
parent
commit
462f335735
5 changed files with 16 additions and 6 deletions
  1. 2 0
      .dockerignore
  2. 2 0
      Builder
  3. 1 1
      Dockerfile
  4. 10 4
      Makefile
  5. 1 1
      Ratinox

+ 2 - 0
.dockerignore

@@ -1,10 +1,12 @@
 Builder
+cryptech-builder-stage1.xz
 .git
 .gitignore
 *.log
 Makefile
 ratinox
 README.md
+screenshots/*.png
 *.stamp
 Xilinx_ISE_DS_Lin_14.7_1015_1.tar
 Xilinx.lic

+ 2 - 0
Builder

@@ -24,4 +24,6 @@ ln -sf /bin/bash /bin/sh
 
 /cryptech-builder/Ratinox
 
+chown -R builder:builder /home/builder
+
 rm -rf /Xilinx_ISE_DS_Lin_14.7_1015_1 /home/builder/Xilinx.lic

+ 1 - 1
Dockerfile

@@ -1,4 +1,4 @@
-FROM cryptech-builder:stage1
+FROM cryptech-builder:stage2
 
 RUN echo 'deb http://deb.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/backports.list
 

+ 10 - 4
Makefile

@@ -13,14 +13,20 @@ stage1.stamp: stage0.stamp Builder Ratinox
 		--mount type=bind,source=$(abspath .),target=/cryptech-builder \
 		cryptech-builder:stage0 \
 		/cryptech-builder/Builder
-	docker commit cryptech-builder-stage1 cryptech-builder:stage1
+	docker export cryptech-builder-stage1 | \
+		xz -v >cryptech-builder-stage1.xz
 	docker container rm cryptech-builder-stage1
 	touch $@
 
-stage2.stamp: stage1.stamp Dockerfile
+stage2.stamp: stage1.stamp
+	docker rmi cryptech-builder:stage0
+	docker import cryptech-builder-stage1.xz cryptech-builder:stage2
+#	rm cryptech-builder-stage1.xz
+	touch $@
+
+stage3.stamp: stage2.stamp Dockerfile
 	docker build -t cryptech-builder .
 	touch $@
 
 clean:
-	rm -f *.stamp Xvfb_screen*
-
+	rm -f *.stamp Xvfb_screen* cryptech-builder-stage1.xz

+ 1 - 1
Ratinox

@@ -17,7 +17,7 @@ def click(*coordinates):
     assert len(coordinates) in (0, 2)
     if coordinates:
         subprocess.check_call(("ratpoison", "-c", "ratwarp {:d} {:d}".format(*coordinates)))
-    shutil.copy(screencap_file, "{}.{:f}".format(screencap_file, time.time()))
+    shutil.copy(screencap_file, "{}.{:f}.xwd".format(screencap_file, time.time()))
     subprocess.check_call(("ratpoison", "-c", "ratclick"))
 
 with xvfbwrapper.Xvfb(fbdir = screencap_dir):