This is a demonstration project of using a resinOS device as a remote host to docker-compose. It just sets up a simple python webserver that uses a redis store to keep track of how many times the webpage has been visited.
Head over to the getting started page of resinOS (https://resinos.io/docs/raspberrypi3/gettingstarted/)
- Download one of the resinOS device images, in this example we use the raspberry pi 3.
- [Optional] Configure the image for wifi connection, to do this you will first have to install
rdt
. - Power up the device and
ping resin.local
to make sure its connected to the network.
Install docker + docker compose on your laptop, following this guide: https://docs.docker.com/compose/install/
- First clone this repo:
git clone https://github.com/resin-io-playground/resinos-compose.git
- Deploy your services: From the project directory run the following.
DOCKER_API_VERSION=1.22 DOCKER_HOST=tcp://resin.local:2375 docker-compose up
Point the browser on your laptop to resin.local:5000
- You need to make sure that the base images used in your services match the architecture of the device you are
running the containers on. In this example, we target a raspberry pi 3, so we need our base images to be
armhf
, the regular/officialamd64
images on dockerhub won't work.