From d387762c8a9b0622d393077943085f898401d107 Mon Sep 17 00:00:00 2001 From: Aiko Mastboom Date: Sun, 10 May 2015 16:52:14 +0200 Subject: [PATCH] non-pi version --- Dockerfile | 4 ++-- Makefile | 2 +- bootstrap | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f48e01b..57ce796 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM aiko/rpi-node:0.10.36 +FROM phusion/baseimage:0.9.16 # Use baseimage-docker's init system. CMD ["/sbin/my_init"] COPY . /tmp -RUN /tmp/bootstrap +RUN NODE_VERSION=0.10.38 TIMEZONE="Europe/Amsterdam" /tmp/bootstrap RUN su -lc /tmp/bootstrap-red red # Clean up APT when done. diff --git a/Makefile b/Makefile index cd4795a..2fff103 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: all build push test version DOCKER_IMAGE_VERSION=0.10.6 -DOCKER_IMAGE_NAME=aiko/node-red-pi +DOCKER_IMAGE_NAME=aiko/node-red DOCKER_IMAGE_TAGNAME=$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_VERSION) all: build diff --git a/bootstrap b/bootstrap index d9a3001..af49471 100755 --- a/bootstrap +++ b/bootstrap @@ -1,7 +1,8 @@ +#!/usr/bin/env bash apt-get update -echo "Europe/Amsterdam" | tee /etc/timezone +echo "${TIME_ZONE}" | tee /etc/timezone dpkg-reconfigure --frontend noninteractive tzdata apt-get install -y \ @@ -21,6 +22,11 @@ python get-pip.py pip install --upgrade requests[security] pip install RPi.GPIO +curl -o /bin/nave https://raw.githubusercontent.com/isaacs/nave/master/nave.sh +chmod +x /bin/nave + +/bin/nave usemain ${NODE_VERSION} + home_red=/home/red useradd -m -d ${home_red} -s /bin/bash red