From 56aa4d06d495cf791aa53694f0cc792ada5866ba Mon Sep 17 00:00:00 2001 From: Shaun Mulligan Date: Mon, 13 Aug 2018 14:43:58 -0700 Subject: [PATCH] update to latest resin.io standards --- Dockerfile.template | 16 +++++++++++----- README.md | 10 ---------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Dockerfile.template b/Dockerfile.template index 744337d..48a6f96 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,15 +1,21 @@ -FROM resin/%%RESIN_MACHINE_NAME%%-debian - -#switch on systemd init system in container -ENV INITSYSTEM on +FROM resin/%%RESIN_MACHINE_NAME%%-debian:jessie +# Install build tools and remove layer cache afterwards RUN apt-get -q update && apt-get install -yq --no-install-recommends \ build-essential \ && apt-get clean && rm -rf /var/lib/apt/lists/* -COPY . /usr/src/app +# Switch to working directory for our app WORKDIR /usr/src/app +# Copy all the source code in. +COPY . . + +# Compile our source code RUN gcc -o hello hello.c +#switch on systemd init system in container +ENV INITSYSTEM on + +# Lauch our binary on container startup. CMD ./hello \ No newline at end of file diff --git a/README.md b/README.md index 8b57797..31ea5b4 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,3 @@ # Hello C in Resin.io This is a very simple project that is an example of how to run C code on a device that is supported by [Resin.io](http://resin.io). - -### Note for Raspberry pi 1 -If the device you are planning to use is a raspberry pi 1 you will have to modify Dockerfile.template in order to use the application. -``` -FROM resin/%%RESIN_MACHINE_NAME%%-debian -``` -To -``` -FROM resin/%%RESIN_MACHINE_NAME%%-raspbian -``` \ No newline at end of file