changeset 1170:cbd4f9f98416

pi_base moves to base image project Ignore-this: 70e2df6d97df5878ca8803501f15f2e0 darcs-hash:939e4ed680cd9732a837743c6e0cd6f83239ffcc
author drewp <drewp@bigasterisk.com>
date Sun, 11 Nov 2018 23:53:15 -0800
parents d9c2b59e760d
children 6ff6e4df4f1e
files service/piNode/Dockerfile service/piNode/makefile service/piNode/pi_base/Dockerfile service/piNode/pi_base/makefile
diffstat 4 files changed, 9 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/service/piNode/Dockerfile	Sat Sep 22 23:09:46 2018 -0700
+++ b/service/piNode/Dockerfile	Sun Nov 11 23:53:15 2018 -0800
@@ -1,4 +1,4 @@
-FROM bang6:5000/pi_base
+FROM bang6:5000/base_pi
 
 COPY requirements.txt ./
 
--- a/service/piNode/makefile	Sat Sep 22 23:09:46 2018 -0700
+++ b/service/piNode/makefile	Sun Nov 11 23:53:15 2018 -0800
@@ -1,17 +1,17 @@
-build_image:
+build_image: gather_image_files
+	docker build --network host -t bang6:5000/pi_node_pi:latest .
+	docker push bang6:5000/pi_node_pi:latest
+
+gather_image_files:
 	(cd /my/proj/homeauto/lib; tar czf /my/site/projects/rdfdb/more.tgz *.py)
 	(cd /my/proj/homeauto/service/arduinoNode; tar czf /my/site/projects/rdfdb/more2.tgz static)
-	ssh pi@garage6 mkdir -p /tmp/piNode/
-	rsync -av --exclude=lib --exclude=pi_base --delete ./ pi@garage6:/tmp/piNode/
-	ssh pi@garage6 docker build -t bang6:5000/pi_node /tmp/piNode/
-	ssh pi@garage6 docker push bang6:5000/pi_node
 
 shell:
-	docker run -it bang6:5000/pi_node  /bin/sh
+	docker run -it bang6:5000/pi_node_pi:latest  /bin/bash
 
 local_run:
-	docker run -it -p 9059:9059 bang6:5000/pi_node python ./piNode.py -v
+	docker run -it -p 9059:9059 bang6:5000/pi_node_pi:latest python ./piNode.py -v
 
 
 push_config:
-	bin/python ../arduinoNode/pushConfig.py pi/
+	docker run -it --net=host -v `pwd`/config:/opt/config bang6:5000/arduino_node python pushConfig.py pi/
--- a/service/piNode/pi_base/Dockerfile	Sat Sep 22 23:09:46 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-FROM resin/rpi-raspbian:jessie
-
-# built static per
-# https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/
-COPY qemu-arm /usr/bin/qemu-arm
-
-# then do this on build host:
-# echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register
-
-WORKDIR /opt
-RUN apt-get update
-RUN apt-get install git build-essential python-pip python-numpy python-pillow python-cryptography
-RUN apt-get install python-dev zlib1g-dev
--- a/service/piNode/pi_base/makefile	Sat Sep 22 23:09:46 2018 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-
-build_on_x86:
-	docker build -t bang6:5000/pi_base .
-	docker push bang6:5000/pi_base