Base scripts and resources to make containers for Torizon with TotalCross. #EmbeddedWorld version!
This is a repository for Totalcross insiders for production of Torizon containers. There is some scripts and helpers to make it easely.
To understand repository workflow you need that:
totalcross-torizon/
├─ bin/
├─ gen/
│ ├─ src/main/java/com/totalcross/
│ │ ├─ HelloWorld.java
│ │ └─ RunHelloWorldApplication.java
│ ├─ build.sh
│ ├─ chime.mp3
│ └─ pom.xml
├─ build.sh
├─ deploy.sh
├─ docker-compose.yaml
├─ Dockerfile
└─ README.mdA brief description:
/bin/contains the application binaries to be executed;/gen/is used to build TotalCross applications, you need to haveTOTALCROSSKEY=<your-key-number>andTOTALCROSSSDK=<path-to-your-valid-sdk>at your environment variables. See more of TotalCross here!/build.shscript to build totalcross/app docker image;/deploy.shexecute with IP as argument to transferdocker-compose.yamlto Torizon.
Follow the steps:
-
Make some changes at
Dockerfile; -
Build new totalcross/app docker image:
$ ./build.sh(Optional) Create a tag with you don't want use latest tag:
$ docker tag <newest id> totalcross/app:<tag>- Push your changes (latest):
$ docker push totalcross/app:<tag>WARNING: be careful with stable tags
-
Make some changes at
docker-compose.yaml; -
scp changes to Torizon:
$ ./deploy.sh <host ip>- In host (Torizon) pull:
$ docker pull totalcross/app:<tag>- Run your application:
$ docker-compose up -d- Show the logs:
$ docker-compose logs- Shutdown:
$ docker-compose downAfter docker-compose up -d if you got a black screen:
- Verify your docker process:
$ docker-ps- Kill your broken application docker image process by id:
$ docker kill <docker id>
- Enter in docker image terminal:
docker run —rm -it -v /tmp:/tmp -v /var/run/dbus/ -v /dev/dri:/dev/dri -u root totalcross/app:latest