Docker image to .sdimg.gz


#1

Hello,
maybe a silly question :roll_eyes:, I’m new to this docker world , but how to convert docker image files to an image for sd card .
Mike


#2

As a rule, you don’t.

What’s the problem you’re trying to solve? There may be a better way… :wink:


#3

Hi @proffalken I generated an image for a raspi from loraserver-pi-gen
just trying to have it flashed to a SD card with etcher


#4

Ah, that code is no longer the “correct” way to do this.

Take a look at the code at https://github.com/brocaar/lora-gateway-os and the documents at https://www.loraserver.io/lora-gateway-os/overview/ - this will give you a dedicated SD image that can easily be flashed with Etcher.


#5

ah ok thought that it was the right image file to start from cause dockerfile based on debian:stretch while lora-gateway-os dockerfile is based on ubuntu:bionic
thanks @Proffalken will try it
and one more thing, as i see in the lora-gateway-os the image is generated for base what to do to generate full image


#6

You can download the full image from https://artifacts.loraserver.io/downloads/lora-gateway-os/raspberrypi/raspberrypi3/2.0.0test2/

Unless you’ve got 50G of disk space and the time to install the Yocto build chain, I’d recommend downloading the image from there and just flashing it to SD card rather than building your own.

The new lora-gateway-os is a very minimal installation as far as the OS is concerned


#7

already installed that image on a raspi RAK2245 combination but there is a problem with speed SPI setting.
and had a topic in that RAK2245 packet forwarder
brocaar updated the lora-gateway-os but did not yet published the image, that’s why i want to build it
and 50G space I have but time I doubt :wink:
thanks @Proffalken for ur help


#8

Once the Yocto chain is in place, you can leave the build to run happily in the background on a linux box using Screen or similar.


#9

ok left the build running for almost half a day :sleeping: , and now it has finished successfully with some warnings
but where can I find the sdimg file
when running docker images I can see and image lora-gateway-os_yocto with 734M
and a folder /deploy was created but empty
but can’t locate the image
Am I missing something?


#10

hmmmm, I’m not sure, let me run it again locally (it’s been a while since I ran it) and I’ll see if I can find the output.


#11

thanks @Proffalken just used the locate in CLI and located the sdimg.gz file in
/var/snap/docker/common/var-lib-docker/volumes/lora-gateway-os_build/_data/tmp/raspberrypi/raspberrypi3-glibc/deploy/2.0.0test3/images/