wifi-connect icon indicating copy to clipboard operation
wifi-connect copied to clipboard

/usr/src/ folder is empty on deployed image

Open alexszilagyi opened this issue 3 years ago • 0 comments

Hi there,

I am running a Raspberry PI Zero W (Balena OS image) and managed to build the image successfully BUT for some reason I cannot figure out why the /usr/src/ folder is empty.

I have tried with this repo as well but the same thing.

I'll mention my project structure:

project-name:
- wifi-connect
--- .balena/
---- qemu-execve
---- balena.yml - https://raw.githubusercontent.com/balenablocks/wifi-connect/master/balena.yml
---- Dockerfile.template - https://raw.githubusercontent.com/balenablocks/wifi-connect/master/Dockerfile.template
---- image-builder.sh - https://raw.githubusercontent.com/balenablocks/wifi-connect/master/image-builder.sh
---- repo.yml - https://raw.githubusercontent.com/balenablocks/wifi-connect/master/repo.yml
---- start.sh - https://raw.githubusercontent.com/balenablocks/wifi-connect/master/start.sh
---- VERSION - https://raw.githubusercontent.com/balenablocks/wifi-connect/master/VERSION
- node-red - git submodule https://github.com/balenalabs/balena-node-red.git
- docker-compose.yml
- image.img - https://www.balena.io/os/#download clean image downloaded from balena OS, dev option
- logo.png - a custom logo

my docker-compose.yml file contains:

  wifi-connect:
    build: ./wifi-connect
    restart: always
    network_mode: 'host'
    privileged: true
    labels:
      io.balena.features.dbus: '1'
      io.balena.features.firmware: '1'
    environment:
      PORTAL_SSID: 'My Custom AP'
      PORTAL_PASSPHRASE: 'MyCustomAPPassword'
      BALENA_ARCH: rpi
      DBUS_SYSTEM_BUS_ADDRESS: 'unix:path=/host/run/dbus/system_bus_socket'

I am following the next steps:

  1. Login to OpenBalena VPS (custom instance successfully)
  2. I create an app for Raspberry Pi Zero W (running: balena app create myApp
  3. On the root folder of project-name folder, I run: balena build --deviceType raspberry-pi --arch rpi --emulated
  4. I deploy to my app balena deploy myApp --source ./
  5. I preload the app to the image.img, using this command: DEBUG=1 balena preload ./image.img --app myApp --splash-image logo.png --version latest

After the device boots up and I go to the folder /usr/src/ and I see that the folder IS EMPTY!

I'm not sure if the issue relies here:

alex@ubuntu:~/myApp$ DEBUG=1 balena preload ./image.img --app myApp --splash-image logo.png
[debug] original argv0="balena" argv=[/home/alex/balena-cli/balena,/snapshot/versioned-source/bin/balena,preload,./image.img,--app,myApp,--splash-image,logo.png] length=8
[debug] new argv=[/home/alex/balena-cli/balena,/snapshot/versioned-source/bin/balena,preload,./image.img,--app,myApp,--splash-image,logo.png] length=8
Building Docker preloader image. [===                     ] 12%
Step 1/7 : FROM docker:20.10.6-dind
Building Docker preloader image. [======                  ] 25%
Step 2/7 : RUN apk update && apk add --no-cache py3-pip parted btrfs-progs util-linux sfdisk file coreutils sgdisk
 ---> Using cache
Building Docker preloader image. [=========               ] 37%
Step 3/7 : COPY ./requirements.txt /tmp/
 ---> Using cache
Building Docker preloader image. [============            ] 50%
Step 4/7 : RUN pip3 install -r /tmp/requirements.txt
 ---> Using cache
Building Docker preloader image. [===============         ] 62%
Step 5/7 : COPY ./src /usr/src/app <--- COULD BE THIS PART?????
 ---> Using cache
Building Docker preloader image. [==================      ] 75%
Step 6/7 : WORKDIR /usr/src/app
 ---> Using cache
Building Docker preloader image. [=====================   ] 87%
Step 7/7 : CMD ["python3", "/usr/src/app/preload.py"]
 ---> Using cache
 ---> 5314c822b44d
Successfully built 5314c822b44d

alexszilagyi avatar Jun 16 '21 00:06 alexszilagyi