This is a block that can be used to run Portainer on a Raspberry Pi and get all the benefits of running Portainer and balena along.
Add the following service to your docker-compose.yml
:
services:
portainer:
image: portainer/portainer-ce:latest
ports:
- 9000:9000
- 9443:9443
labels:
- io.balena.features.balena-socket=1
volumes:
- data:/data
volumes:
data:
If you would like to test a standalone version, click the button below
and deploy the code into a balenaCloud fleet.
Once you flashed a SD card with the balenaOS image from that fleet you will be able to see this:
Type on the browser https://<local ip address>:9433
and you might be able to access to the Portainer UI.
Click Add Environment
to start using Portainer on balena.
Now select Docker
and click Connect via socket
plus Override default socket path
. You are going to be able to use the balena-engine
sock to connect with the Portainer Docker API. Add the public IP of your device as well.
As a result, you might have a new environment on your device.
From now you can start adding new containers on your Portainer running balena.
Have fun and let us know what you deployed with Portainer on balena please :)
Do you want to help make the balena Portainer example better? Feel free to contribute opening issues and PRs.
Thanks @klutchell for setting up the docker-compose for building portainer using balena.