LSDK 19.09 How to use Dockerfile image (LS1012A)?

cancel
Showing results for 
Search instead for 
Did you mean: 

LSDK 19.09 How to use Dockerfile image (LS1012A)?

399 Views
christophe_schm
Contributor IV

Hi all,

Coming back on a question I asked a few days ago in another of my post: https://community.nxp.com/message/1260991?commentID=1260991#comment-1260991 

It started with the fact that WSL2, despite said so, is not available as of today for the normal Windows user.

WSL does, sure but not WSL2. There are some nice advantages I won'd listen here in rolling WSL2 where possible.

So I am looking for an alternative and see NXP also provides Docker files I of course immediately started playing with.

I picked the 18.04 Ubuntu Docker file and also managed to build an image (~1.2 Gbytes at the end) on my Windows 10 machine. I use Docker for Windows community edition to build my image and also run portainer.io to manage my local containers. Run latest Windows 10 OS version and latest Docker for Windows version. All perfect so far.

Where it starts to not working well is when I try to use the container: it's not interactive and when starting it it immediately exits, no logs, no error but just no starting.

Of course I read the LSDK 

Layerscape Software Development Kit User Guide
Supports: LSDK 19.09-update-311219

I specifically talk about §4.1.1 Host system requirements, section "Emulate Ubuntu 18.04 environment using Docker container (optional)". I find this approach nice and absolutely logic - but it seems not to work and there are no instructions given how to use it except the Makefile.

Can anybody tell me here how I am supposed to run Docker container? And yes: the Container runs on a Windows host that runs Docker daemon but this shall not be the issue.

Thx Christophe

0 Kudos
4 Replies

268 Views
christophe_schm
Contributor IV

Any thoughts here from the community? Would be glad to get some feedback mainly from those using the provided Docker file regarding it's correct usage (e.g. on which host OS it's supposed to run seeing implementation details of "flex-builder docker"). Thx Christophe

0 Kudos

268 Views
christophe_schm
Contributor IV

It's fun talking to myself here, anyway :smileyhappy: But I'd like to share since am sure I am not the only one with this issue, here we go then.

Since I cannot find any relevant information about how to correctly use "flex-builder docker" part of SDK I keep trying myself, and here what I find.

  • Using this Dockerfile: /home/chris/flexbuild_lsdk1909_update_221019/docker/ubuntu/18.04/Dockerfile
  • Managed downloading and instanciating a container properly vie portainer.io/docker-compose
    • Host docker daemon runs on latest Docker Desktop for Windows using Linux containers + Hyper-V
    • Can use docker daemon both from Windows and WSL CMD shells and evns
  • Abel to enter the container interactively and do all nasty stuff I'd like
    • From portainer.io web interface
    • From both Windows CMD and WSL shells (docker attach command)
  • Impossible to
    • execute: /home/chris/flexbuild_lsdk1909_update_221019/docker/ubuntu/18.04/Makefile
      • It's supposed to create the docker container using various variables --> not working
      • Does not function on a real Windows or a real Ubuntu 18.04 host
    • execute "flex-builder docker"
      • On Windows host and inside WSL it complains about a missing loop device, googled + tried many things, no way
      • On Linux host it attempts effectively to join the net to download an image

Sending build context to Docker daemon 5.12kB
Step 1/14 : FROM ubuntu:18.04
Get https://registry-1.docker.io/v2/: read tcp 10.16.4.14:49728->34.197.189.129:443: read: connection reset by peer
Makefile:7: recipe for target 'build' failed
make: *** [build] Error 1

As a conclusion here I'd say forget using the Ubuntu Docker image since WSL on Windows does the job.

I did try this since hoped that the Docker approach on Windows host would allow me to circumvent the WSL syscall limitations that WSL2 shall fix but since WSL2 is not available yet I need options. Seeing that Docker in Windows is mandatory to run inside a Hyper-V hosted VM (named: "DockerDesktopVM") I hope through such a Hyper-V sandwich I shall get full access to all syscalls WSL cannot provide - needed to build userland distros.

 

Anybody here please so I don't loos more time on trying around features?

Thx Christophe

0 Kudos

268 Views
christophe_schm
Contributor IV

Ok found it and sorry if this sounds stupid. You've to go over docker-compose and not attempt to directly launch the container as it is ...

1. Create a docker-compose.yml file

2. Launch docker-compose up (supposing your .yml is in the folder from where you launch docker-compose up)

The content of .yml file in my case is

version: '3.7'
services:
  sdk:
    image: mynxpsdk:latest
    restart: always
    stdin_open: true
    tty: true

Last two lines make the container interactive at the end.

Found this here for instance: Interactive shell using Docker Compose - Stack Overflow 

Hope this helps others here who're wondering how that works.

Cheers Christophe

0 Kudos

268 Views
christophe_schm
Contributor IV

Keep thinking, it's maybe the http(s)_proxy that is empty in my case.

Agree I still need to ramp-up in correctly using Docker here, WIP. Any help however welcome to go faster on endeavors :smileyhappy:

Thx Christophe

0 Kudos