Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -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
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
```