balena preload with Gitlab CI

Hi,

I’d like to use Gitlab CI (with the Gitlab shared runners) to create images with preloaded releases. I came to the following .gitlab.yml file

stages:
  - build

build_jn30b_image:
  image: node:12.22.5
  stage: build
  tags:
    - linux
    - docker
  variables:
    DOCKER_HOST: tcp://docker:2375
    DOCKER_TLS_CERTDIR: ""
  services:
    - docker:dind
  script:
    - wget -q https://github.com/balena-io/balena-cli/releases/download/v12.47.0/balena-cli-v12.47.0-linux-x64-standalone.zip && unzip -q balena-cli-v12.47.0-linux-x64-standalone.zip -d . && rm balena-cli-v12.47.0-linux-x64-standalone.zip
    - export PATH=$PATH:$PWD/balena-cli
    - balena login --credentials --email $BALENA_LOGIN_EMAIL --password $BALENA_LOGIN_PASSWORD
    - balena os download jn30b-nano -o $PWD/balena.img --version $BALENA_OS_REVISION
    - balena preload --dockerHost docker --dockerPort 2375 $PWD/balena.img --fleet $BALENA_FLEET --commit current

But I got the following output and the error in the balena preload

$ balena os download jn30b-nano -o $PWD/balena.img --version $BALENA_OS_REVISION
Getting device operating system for jn30b-nano
Downloading Device OS 2.75.0+rev1 [                        ] 0% eta 3m52s

Downloading Device OS 2.75.0+rev1 [========================] 100% eta 0s
The image was downloaded successfully
$ balena preload --dockerHost docker --dockerPort 2375 $PWD/balena.img --fleet $BALENA_FLEET --commit current
Building Docker preloader image. [                        ] 0%

Building Docker preloader image. [========================] 100%
ECONNREFUSED: connect ECONNREFUSED 0.0.0.0:33063
Additional information may be available with the `--debug` flag.
For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting

This seems to be related to this thread: Balena Preload on Github Actions
But I couldn’t still solve my problem.

Any help how to solve this networking issue?
Thanks

Hello there, can you try running the preload command with debugging enabled? You can add the --debug flag to the command or prepend the env var DEBUG=1 balena preload .... That might give us more information on what is going wrong.

Checking the thread you linked, it seems docker-in-docker is not supported on GitHub actions at the moment. I tried searching for GitLab support but couldn’t find anything that claimed support for it so my guess is it’s the same. DinD is required for preloading. However this user has made preloading work on actions with a slightly different approach: Balena Preload on Github Actions - #15 by pcorbel
I suggest you take a look at it and let us know how it goes!

The output with --debug in the balena preload command

$ balena preload --debug --dockerHost docker --dockerPort 2375 $PWD/balena.img --fleet $BALENA_FLEET --commit current

[282](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L282)[debug] new argv=[/builds/romain.bethenod/system-preparation/balena-cli/balena,/snapshot/versioned-source/bin/balena,preload,--dockerHost,docker,--dockerPort,2375,/builds/romain.bethenod/system-preparation/balena.img,--fleet,Romain,--commit,current] length=12

[283](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L283)[debug] Deprecation check: 0.00056 days since last npm registry query for next major version release date.

[284](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L284)[debug] Will not query the registry again until at least 7 days have passed.

[285](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L285)Building Docker preloader image. [ ] 0%

[286](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L286)

[287](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L287)Building Docker preloader image. [=== ] 12%

[288](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L288)Step 1/7 : FROM alpine:3.12

[289](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L289) ---> 13621d1b12d4

[290](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L290)

[291](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L291)Building Docker preloader image. [====== ] 25%

[292](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L292)Step 2/7 : WORKDIR /usr/src/app

[293](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L293) ---> Running in e4753602c7b3

[294](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L294)Removing intermediate container e4753602c7b3

[295](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L295) ---> d1715e469a99

[296](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L296)

[297](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L297)Building Docker preloader image. [========= ] 37%

[298](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L298)Step 3/7 : RUN apk add --no-cache curl py3-pip parted btrfs-progs util-linux sfdisk file coreutils sgdisk e2fsprogs-extra docker

[299](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L299) ---> Running in e25d42364746

[300](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L300)fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz

[301](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L301)fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz

[302](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L302)(1/83) Installing libblkid (2.35.2-r0)

[303](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L303)(2/83) Installing lzo (2.10-r2)

[304](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L304)(3/83) Installing libuuid (2.35.2-r0)

[305](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L305)(4/83) Installing zstd-libs (1.4.9-r0)

[306](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L306)(5/83) Installing btrfs-progs (5.6.1-r0)

[307](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L307)(6/83) Installing libacl (2.2.53-r0)

[308](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L308)(7/83) Installing libattr (2.4.48-r0)

[309](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L309)(8/83) Installing coreutils (8.32-r0)

[310](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L310)(9/83) Installing ca-certificates (20191127-r4)

[311](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L311)(10/83) Installing nghttp2-libs (1.41.0-r0)

[312](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L312)(11/83) Installing libcurl (7.78.0-r0)

[313](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L313)(12/83) Installing curl (7.78.0-r0)

[314](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L314)(13/83) Installing libseccomp (2.4.4-r0)

[315](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L315)(14/83) Installing runc (1.0.0_rc95-r0)

[316](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L316)(15/83) Installing containerd (1.4.4-r0)

[317](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L317)(16/83) Installing libmnl (1.0.4-r0)

[318](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L318)(17/83) Installing libnftnl-libs (1.1.6-r0)

[319](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L319)(18/83) Installing iptables (1.8.4-r2)

[320](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L320)(19/83) Installing tini-static (0.19.0-r0)

[321](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L321)(20/83) Installing device-mapper-libs (2.02.186-r1)

[322](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L322)(21/83) Installing docker-engine (20.10.3-r0)

[323](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L323)(22/83) Installing docker-cli (20.10.3-r0)

[324](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L324)(23/83) Installing docker (20.10.3-r0)

[325](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L325)Executing docker-20.10.3-r0.pre-install

[326](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L326)(24/83) Installing libcom_err (1.45.6-r0)

[327](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L327)(25/83) Installing e2fsprogs-libs (1.45.6-r0)

[328](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L328)(26/83) Installing e2fsprogs (1.45.6-r0)

[329](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L329)(27/83) Installing e2fsprogs-extra (1.45.6-r0)

[330](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L330)(28/83) Installing libmagic (5.38-r0)

[331](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L331)(29/83) Installing file (5.38-r0)

[332](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L332)(30/83) Installing ncurses-terminfo-base (6.2_p20200523-r0)

[333](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L333)(31/83) Installing ncurses-libs (6.2_p20200523-r0)

[334](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L334)(32/83) Installing readline (8.0.4-r0)

[335](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L335)(33/83) Installing parted (3.3-r0)

[336](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L336)(34/83) Installing libbz2 (1.0.8-r1)

[337](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L337)(35/83) Installing expat (2.2.9-r1)

[338](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L338)(36/83) Installing libffi (3.3-r2)

[339](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L339)(37/83) Installing gdbm (1.13-r1)

[340](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L340)(38/83) Installing xz-libs (5.2.5-r0)

[341](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L341)(39/83) Installing sqlite-libs (3.32.1-r1)

[342](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L342)(40/83) Installing python3 (3.8.10-r0)

[343](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L343)(41/83) Installing py3-appdirs (1.4.4-r1)

[344](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L344)(42/83) Installing py3-ordered-set (4.0.1-r0)

[345](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L345)(43/83) Installing py3-parsing (2.4.7-r0)

[346](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L346)(44/83) Installing py3-six (1.15.0-r0)

[347](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L347)(45/83) Installing py3-packaging (20.4-r0)

[348](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L348)(46/83) Installing py3-setuptools (47.0.0-r0)

[349](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L349)(47/83) Installing py3-chardet (3.0.4-r4)

[350](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L350)(48/83) Installing py3-idna (2.9-r0)

[351](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L351)(49/83) Installing py3-certifi (2020.4.5.1-r0)

[352](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L352)(50/83) Installing py3-urllib3 (1.25.9-r0)

[353](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L353)(51/83) Installing py3-requests (2.23.0-r0)

[354](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L354)(52/83) Installing py3-msgpack (1.0.0-r0)

[355](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L355)(53/83) Installing py3-lockfile (0.12.2-r3)

[356](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L356)(54/83) Installing py3-cachecontrol (0.12.6-r0)

[357](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L357)(55/83) Installing py3-colorama (0.4.3-r0)

[358](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L358)(56/83) Installing py3-distlib (0.3.0-r0)

[359](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L359)(57/83) Installing py3-distro (1.5.0-r1)

[360](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L360)(58/83) Installing py3-webencodings (0.5.1-r3)

[361](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L361)(59/83) Installing py3-html5lib (1.0.1-r4)

[362](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L362)(60/83) Installing py3-pytoml (0.1.21-r0)

[363](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L363)(61/83) Installing py3-pep517 (0.8.2-r0)

[364](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L364)(62/83) Installing py3-progress (1.5-r0)

[365](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L365)(63/83) Installing py3-toml (0.10.1-r0)

[366](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L366)(64/83) Installing py3-retrying (1.3.3-r0)

[367](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L367)(65/83) Installing py3-contextlib2 (0.6.0-r0)

[368](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L368)(66/83) Installing py3-pip (20.1.1-r0)

[369](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L369)(67/83) Installing libfdisk (2.35.2-r0)

[370](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L370)(68/83) Installing libsmartcols (2.35.2-r0)

[371](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L371)(69/83) Installing sfdisk (2.35.2-r0)

[372](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L372)(70/83) Installing libgcc (9.3.0-r2)

[373](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L373)(71/83) Installing popt (1.16-r7)

[374](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L374)(72/83) Installing libstdc++ (9.3.0-r2)

[375](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L375)(73/83) Installing sgdisk (1.0.6-r0)

[376](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L376)(74/83) Installing blkid (2.35.2-r0)

[377](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L377)(75/83) Installing libcap-ng (0.7.10-r1)

[378](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L378)(76/83) Installing setpriv (2.35.2-r0)

[379](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L379)(77/83) Installing libmount (2.35.2-r0)

[380](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L380)(78/83) Installing findmnt (2.35.2-r0)

[381](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L381)(79/83) Installing mcookie (2.35.2-r0)

[382](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L382)(80/83) Installing hexdump (2.35.2-r0)

[383](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L383)(81/83) Installing lsblk (2.35.2-r0)

[384](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L384)(82/83) Installing cfdisk (2.35.2-r0)

[385](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L385)(83/83) Installing util-linux (2.35.2-r0)

[386](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L386)Executing busybox-1.31.1-r20.trigger

[387](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L387)Executing ca-certificates-20191127-r4.trigger

[388](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L388)OK: 380 MiB in 97 packages

[389](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L389)Removing intermediate container e25d42364746

[390](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L390) ---> e5e3db540a09

[391](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L391)

[392](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L392)Building Docker preloader image. [============ ] 50%

[393](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L393)Step 4/7 : COPY requirements.txt ./

[394](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L394) ---> 3b88cca001a8

[395](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L395)

[396](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L396)Building Docker preloader image. [=============== ] 62%

[397](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L397)Step 5/7 : RUN pip3 install --no-cache-dir -r requirements.txt

[398](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L398) ---> Running in 3c6fb41dcde2

[399](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L399)Collecting sh==1.12.14

[400](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L400) Downloading sh-1.12.14-py2.py3-none-any.whl (38 kB)

[401](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L401)Collecting retry==0.9.2

[402](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L402) Downloading retry-0.9.2-py2.py3-none-any.whl (8.0 kB)

[403](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L403)Collecting decorator>=3.4.2

[404](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L404) Downloading decorator-5.0.9-py3-none-any.whl (8.9 kB)

[405](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L405)Collecting py<2.0.0,>=1.4.26

[406](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L406) Downloading py-1.10.0-py2.py3-none-any.whl (97 kB)

[407](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L407)Installing collected packages: sh, decorator, py, retry

[408](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L408)Successfully installed decorator-5.0.9 py-1.10.0 retry-0.9.2 sh-1.12.14

[409](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L409)Removing intermediate container 3c6fb41dcde2

[410](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L410) ---> 916e53740719

[411](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L411)

[412](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L412)Building Docker preloader image. [================== ] 75%

[413](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L413)Step 6/7 : COPY src/ ./

[414](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L414) ---> 69152afbc9bc

[415](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L415)

[416](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L416)Building Docker preloader image. [===================== ] 87%

[417](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L417)Step 7/7 : CMD ["python3", "/usr/src/app/preload.py"]

[418](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L418) ---> Running in d80404fb9d2a

[419](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L419)Removing intermediate container d80404fb9d2a

[420](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L420) ---> ef40772206bb

[421](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L421)Successfully built ef40772206bb

[422](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L422)Successfully tagged balena/balena-preload:latest

[423](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L423)

[424](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L424)Building Docker preloader image. [========================] 100%

[425](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L425)Waiting for Docker to start...

[426](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L426)Docker started

[427](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L427)Leaving splash image alone

[428](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L428)Expanding partition n°16 of /img/balena.img

[429](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L429)Resizing ext4 filesystem of partition n°16 of /img/balena.img using /dev/loop0

[430](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L430)File system OK

[431](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L431)Waiting for Docker to start...

[432](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L432)Docker started

[433](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L433)ECONNREFUSED: connect ECONNREFUSED 0.0.0.0:37111

[434](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L434)Error: connect ECONNREFUSED 0.0.0.0:37111

[435](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L435) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)

[436](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L436)From previous event:

[437](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L437) at runCallback (timers.js:705:18)

[438](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L438) at tryOnImmediate (timers.js:676:5)

[439](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L439) at processImmediate (timers.js:658:5)

[440](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L440) at process.topLevelDomainCallback (domain.js:126:23)

[441](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L441)From previous event:

[442](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L442) at preload.Bluebird.resolve.then (/snapshot/versioned-source/node_modules/balena-preload/build/preload.js:751:28)

[443](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L443)For further help or support, visit:

[444](https://gitlab.com/romain.bethenod/system-preparation/-/jobs/1541813018#L444)https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting

To my understanding docker in docker is supported on Gitlab. You can take a look here: Use Docker to build Docker images | GitLab

Do you mean here to get a Gitlab runner which can execute docker commands directly? Yes sure it should work but how to get one from the Gitlab shared runner? I’d strongly prefer to not have to maintain a server just for a job.

Hello @Romain ,

The link you shared has a few examples with specific docker images ( docker:19.03.12)and configurations (tls_verify). Have you tried using a similar config to run the preload?

Hello,

exactly I tried to do it. The .gitlab.yml is provided in the first message. As you can see, some part are working like Building Docker preloader image. Then it cannot connect to the port. If you have an example of .gitlab.yml where it works (with tls_verify), I will for sure take a look.

Hello @Romain sorry for the late answer on this!

Did you make it run? what’s the situation of this nowadays?

Let us know if we can help you more!

For Gitlab (on the shared Gitlab runners), with the few answer I was still unable to make it work. If you can test directly on Gitlab and provide something more specific in order to make it work, I can try to integrate it into our project.

Hello, I don’t see any reason why preload would be unable to run on a shared Gitlab runner, but I’ve never tried it myself. We mostly use Github at balena and I’ve only run one personal project on shared Gitlab runners.

I skimmed your job configuration and I don’t see any obvious issues. I checked that the jn30b-nano device type does use the more modern overlay2 storage, so it shouldn’t be a matter of the runner or dind image dropping support for AUFS.

Have you tried a more recent release of the balena CLI? There have been a number of changes to preload since v12.47.0 that would be worth picking up.