I wanted to share our Dockerfile.txt (3.5 KB) that we use to install the native l4t packages inside a docker image (rather than copy files from the filesystem or another docker image).
This allows you to use those images on a build server or jetson (with enough disk memory). It is also buildable from a CI without access to an SDK Manager.
Previously I failed using the base image since libnvinfer and others will depend on CUDA, which fails to install because the files are present (copied) but not installed via the package. But if you just install the l4t packages you will fail because the CCP (compatiblity check) will fail. For Jetpack 4.3 based images I just installed a dummy package that provides the CCP package now this is included in the l4t-core package. But you can disable CCP checking by creating a file (see the Dockerfile). If you have very limited memory I would only use that image on build server or similar.
Before there was on official Dockerfile source (to be the most compatible) I had to check the commands used in l4t-base image from the image’s history, now, if you did not see it already the Dockerfile is publicly available: Official Dockerfile
Hope that helps anyone,