Well, nearly 
Most of the images seem to get created. However, there are two issues when I remove the --test
argument:
- When removing the
--test
argument, the images fail to be pushed to my docker hub repo. The username and API token are specified correctly, as the login to the docker hub occurs right at the beginning of the build process, as I can see that the Login Succeeded
from the docker logs. However, we see logs (for all builds) :
e[0me[34m => => exporting layers 16.6s
e[0me[34m => => writing image sha256:562846cfb5194c610460c21f82129f5d9f2c1f29595c8 0.1s
e[0me[34m => => naming to docker.io/swinster/whatsapp-ha/whatsapp-ha-aarch64:1.2.4 0.1s
e[0me[?25h[22:40:13] INFO: e[32mFinish build for swinster/whatsapp-ha/whatsapp-ha-aarch64:1.2.4e[0m
[22:40:13] INFO: e[32mCreate image tag: lateste[0m
[22:40:13] INFO: e[32mStart upload of swinster/whatsapp-ha/whatsapp-ha-aarch64:1.2.4 (attempt #1/3)e[0m
[22:40:14] WARNING: e[33mUpload failed on attempt #1e[0m
[22:40:44] INFO: e[32mStart upload of swinster/whatsapp-ha/whatsapp-ha-aarch64:1.2.4 (attempt #2/3)e[0m
[22:40:45] WARNING: e[33mUpload failed on attempt #2e[0m
[22:41:15] INFO: e[32mStart upload of swinster/whatsapp-ha/whatsapp-ha-aarch64:1.2.4 (attempt #3/3)e[0m
[22:41:16] FATAL: e[31mUpload failed on attempt #3e[0m
- With the
--test
argument removed, not all the images are built. For example, I only see four images created (armhf
, amd64
, i386
and aarch64
). However, the logs indicate that five are to be built. Interestingly, when the --test
parameter is specified, all five images appear in the local docker images.
[22:35:43] INFO: e[32mRun addon build for: armhf armv7 amd64 i386 aarch64e[0m
[22:35:43] INFO: e[32mInit cache for swinster/whatsapp-ha/whatsapp-ha-i386:1.2.4 with tag latest and platform linux/386e[0m
[22:35:43] INFO: e[32mInit cache for swinster/whatsapp-ha/whatsapp-ha-armhf:1.2.4 with tag latest and platform linux/arm/v6e[0m
[22:35:43] INFO: e[32mInit cache for swinster/whatsapp-ha/whatsapp-ha-amd64:1.2.4 with tag latest and platform linux/amd64e[0m
[22:35:43] INFO: e[32mInit cache for swinster/whatsapp-ha/whatsapp-ha-aarch64:1.2.4 with tag latest and platform linux/arm64e[0m
[22:35:43] INFO: e[32mInit cache for swinster/whatsapp-ha/whatsapp-ha-armv7:1.2.4 with tag latest and platform linux/arm/v7e[0m
[22:35:47] INFO: e[32mRun build for swinster/whatsapp-ha/whatsapp-ha-i386:1.2.4 with platform linux/386e[0m
[22:35:48] INFO: e[32mRun build for swinster/whatsapp-ha/whatsapp-ha-armhf:1.2.4 with platform linux/arm/v6e[0m
[22:35:48] INFO: e[32mRun build for swinster/whatsapp-ha/whatsapp-ha-amd64:1.2.4 with platform linux/amd64e[0m
[22:35:50] INFO: e[32mRun build for swinster/whatsapp-ha/whatsapp-ha-aarch64:1.2.4 with platform linux/arm64e[0m
It is, of course, possible to push the image one by one manually after they have been built, but it would seem sensible to push them automatically from this process.
For info, this is the docker-compose.yaml
file I have used:
version: '3.7'
services:
builder:
container_name: builder
image: homeassistant/amd64-builder
command:
- --target
- /data
- --all
- --test
- --image
- whatsapp-ha-{arch}
- --docker-hub
- swinster/whatsapp-ha
- --docker-user
- swinster
- --docker-password
- dckr_pat_xxxxxxxxxxxxxxxxxxxx
volumes:
- /data/ha-addons/whatsapp_addon:/data
- /var/run/docker.sock:/var/run/docker.sock:ro
privileged: true
stdin_open: true
tty: true
restart: 'no'