From 36e5af0018631b88a063ca7e758e212f99b26b6b Mon Sep 17 00:00:00 2001 From: Praneeth Bodduluri Date: Mon, 22 Sep 2014 14:45:15 +0200 Subject: [PATCH] i386 support for the edison --- Dockerfile.i386 | 24 ++++++++++++++++++++++++ Dockerfile.x86 => Dockerfile.x86_64 | 2 +- Makefile | 16 +++++++++++----- 3 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 Dockerfile.i386 rename Dockerfile.x86 => Dockerfile.x86_64 (84%) diff --git a/Dockerfile.i386 b/Dockerfile.i386 new file mode 100644 index 00000000..0ce9cde7 --- /dev/null +++ b/Dockerfile.i386 @@ -0,0 +1,24 @@ +FROM resin/i386-ubuntu:14.04 + +# Install. +RUN \ + apt-get update && \ + apt-get install -y curl git unzip wget npm nodejs inetutils-ping + +ADD . /app + +WORKDIR /app + +ENV SUPERVISOR_IMAGE resin/i386-supervisor +ENV CONFIG_MOUNT_POINT /boot/config.json +ENV LED_FILE /dev/null + +RUN rm -rf node_modules +RUN ln -sf /usr/bin/nodejs /usr/bin/node +RUN npm install --unsafe-perm --production + +RUN ln -sf /app/entry.sh /start + +RUN apt-get clean + +CMD ["/app/entry.sh"] diff --git a/Dockerfile.x86 b/Dockerfile.x86_64 similarity index 84% rename from Dockerfile.x86 rename to Dockerfile.x86_64 index 5f4effdf..b294c936 100644 --- a/Dockerfile.x86 +++ b/Dockerfile.x86_64 @@ -4,7 +4,7 @@ ADD . /app WORKDIR /app -ENV SUPERVISOR_IMAGE resin/x86-supervisor +ENV SUPERVISOR_IMAGE resin/x86_64-supervisor ENV CONFIG_MOUNT_POINT /boot/config.json ENV LED_FILE /dev/null diff --git a/Makefile b/Makefile index 4064fc05..3009ba72 100644 --- a/Makefile +++ b/Makefile @@ -49,10 +49,16 @@ supervisor-accelerated: echo 'Please run make accelerator in resin-buildstep to continue' endif -supervisor-x86: - tar --exclude="Dockerfile" --transform='flags=r;s|Dockerfile.x86|Dockerfile|' -c . | docker build -t resin/x86-supervisor - +supervisor-x86_64: + tar --exclude="Dockerfile" --transform='flags=r;s|Dockerfile.x86_64|Dockerfile|' -c . | docker build -t resin/x86_64-supervisor - -run-supervisor-x86: - docker run --privileged -d -v /var/run/docker.sock:/run/docker.sock -e API_ENDPOINT=https://staging.resin.io -e REGISTRY_ENDPOINT=registry.staging.resin.io -e PUBNUB_SUBSCRIBE_KEY=sub-c-bananas -e PUBNUB_PUBLISH_KEY=pub-c-bananas -e MIXPANEL_TOKEN=bananasbananas resin/x86-supervisor /start +run-supervisor-x86_64: + docker run --privileged -d -v /var/run/docker.sock:/run/docker.sock -e API_ENDPOINT=https://staging.resin.io -e REGISTRY_ENDPOINT=registry.staging.resin.io -e PUBNUB_SUBSCRIBE_KEY=sub-c-bananas -e PUBNUB_PUBLISH_KEY=pub-c-bananas -e MIXPANEL_TOKEN=bananasbananas resin/x86_64-supervisor /start -.PHONY: supervisor supervisor-accelerated supervisor-x86 run-supervisor-x86 +supervisor-i386: + tar --exclude="Dockerfile" --transform='flags=r;s|Dockerfile.i386|Dockerfile|' -c . | docker build -t resin/i386-supervisor - + +run-supervisor-i386: + docker run --privileged -d -v /var/run/docker.sock:/run/docker.sock -e API_ENDPOINT=https://staging.resin.io -e REGISTRY_ENDPOINT=registry.staging.resin.io -e PUBNUB_SUBSCRIBE_KEY=sub-c-bananas -e PUBNUB_PUBLISH_KEY=pub-c-bananas -e MIXPANEL_TOKEN=bananasbananas resin/i386-supervisor /start + +.PHONY: supervisor supervisor-accelerated supervisor-x86_64 run-supervisor-x86_64 supervisor-i386 run-supervisor-i386