-
Notifications
You must be signed in to change notification settings - Fork 150
Building with Docker
Guy Sheffer edited this page Dec 8, 2018
·
21 revisions
Docker building image is avilable at Docker Hub.
To use it go the folder of your distro and run:
cd distro/src
docker run guysoft/custompios:devel -v ./:/distro --name mydistro_builder --devvice /dev/loop-control
You can also use this example docker-compose.yml
in distro/src
:
version: '3.6'
services:
custompios:
image: guysoft/custompios:devel
container_name: mydistro_builder
tty: true
restart: always
privileged: true
volumes:
- ./:/distro
devices:
- /dev/loop-control
Note: you are mounting the src folder of your imgae to the docker container.
To build a variant on the machine simply run:
docker exec -it mydistro_builder /CustomPiOS/nightly_build_scripts/custompios_nightly_build
Your image would be created as a zip file at distro/src/workspace
If you are building a variant it will appear in distro/src/workspace-{variant-name}
It is recommended to build against the latest in the CustomPiOS repo, there is an automated build, so you can add a watchtower that will always keep the CustomPiOS docker image up do date, by using v2tec/watchtower
:
version: '3.6'
services:
custompios:
image: guysoft/custompios:devel
container_name: octopi-build
tty: true
restart: always
privileged: true
volumes:
- ./:/distro
devices:
- /dev/loop-control
labels:
- com.centurylinklabs.watchtower.enable=true
watchtower:
image: v2tec/watchtower
container_name: custompios-watcher
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json
command: --cleanup --label-enable --interval 30
restart: always