Docker on TX1 (or TX2)

Are there any plans to port https://github.com/NVIDIA/nvidia-docker to the ARM64 architecture so it can run on TX1/TX2?

I think also for embedded/IoT type devices there are benefits to using a containerized architecture.

Thanks,
Timo

Hi,

Docker
TX1: please install it with:

sudo apt-get install docker.io

TX2: some kernel option needed to be enabled first, please check this topic:
https://devtalk.nvidia.com/default/topic/1000224/jetson-tx2/docker-on-the-tx2

Nvidia-Docker
Currently, NvDocker doesn’t support TX1/TX2. But we may enable this on NvDocker2.0
But there is some alternative from the community. You can check if it helps:

Hi,

These solutions do work but install obsolete versions of docker! Is there a way of getting docker-ce to run on a Jetson TX1?

Thanks

Hi,

Looks like docker-ce doesn’t have arm64 package:
https://apt.dockerproject.org/repo/pool/testing/d/docker-engine/

Maybe you can post this request to the docker forum:

Hi,

I found docker-ce arm64 for ubuntu 16.04 here.

https://download.docker.com/linux/ubuntu/dists/xenial/pool/edge/arm64/
and
sudo apt-get install docker-ce

The Tegra-Docker solution works (I have verified), but still feels a little like a work-around. Also, I believe the docker version (1.12.6 currently) they recommend is a little dated and points to amd64 instead of arm64. The docker package still works though. BTW, the Tegra-Docker solution sources the Jetsonhacks blog (link below) for custom kernel build instructions…

https://github.com/Technica-Corporation/Tegra-Docker

building custom kernels: TX1/TX2
http://www.jetsonhacks.com/2017/08/07/build-kernel-ttyacm-module-nvidia-jetson-tx1/
https://github.com/jetsonhacks/buildJetsonTX1Kernel

docker-ce arm64: stable
https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/arm64/

docker-ce install: ubuntu
https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/

To check kernel compatibility with docker, run the check-compatibility.sh script:
https://docs.docker.com/engine/installation/linux/linux-postinstall/#chkconfig

-K


nvidia@tegra-ubuntu:~/bin$ bash check-config.sh
info: reading kernel config from /proc/config.gz …

Generally Necessary:

  • cgroup hierarchy: properly mounted [/sys/fs/cgroup]
  • CONFIG_NAMESPACES: enabled
  • CONFIG_NET_NS: enabled
  • CONFIG_PID_NS: enabled
  • CONFIG_IPC_NS: enabled
  • CONFIG_UTS_NS: enabled
  • CONFIG_CGROUPS: enabled
  • CONFIG_CGROUP_CPUACCT: enabled
  • CONFIG_CGROUP_DEVICE: enabled
  • CONFIG_CGROUP_FREEZER: enabled
  • CONFIG_CGROUP_SCHED: enabled
  • CONFIG_CPUSETS: enabled
  • CONFIG_MEMCG: enabled
  • CONFIG_KEYS: enabled
  • CONFIG_VETH: enabled
  • CONFIG_BRIDGE: enabled
  • CONFIG_BRIDGE_NETFILTER: enabled (as module)
  • CONFIG_NF_NAT_IPV4: enabled
  • CONFIG_IP_NF_FILTER: enabled
  • CONFIG_IP_NF_TARGET_MASQUERADE: enabled
  • CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled
  • CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled
  • CONFIG_NETFILTER_XT_MATCH_IPVS: enabled
  • CONFIG_IP_NF_NAT: enabled
  • CONFIG_NF_NAT: enabled
  • CONFIG_NF_NAT_NEEDED: enabled
  • CONFIG_POSIX_MQUEUE: enabled
  • CONFIG_DEVPTS_MULTIPLE_INSTANCES: enabled

Optional Features:

  • CONFIG_USER_NS: enabled
  • CONFIG_SECCOMP: enabled
  • CONFIG_CGROUP_PIDS: enabled
  • CONFIG_MEMCG_SWAP: enabled
  • CONFIG_MEMCG_SWAP_ENABLED: enabled
    (cgroup swap accounting is currently enabled)
  • CONFIG_MEMCG_KMEM: enabled
  • CONFIG_BLK_CGROUP: enabled
  • CONFIG_BLK_DEV_THROTTLING: enabled
  • CONFIG_IOSCHED_CFQ: enabled
  • CONFIG_CFQ_GROUP_IOSCHED: enabled
  • CONFIG_CGROUP_PERF: enabled
  • CONFIG_CGROUP_HUGETLB: missing
  • CONFIG_NET_CLS_CGROUP: enabled
  • CONFIG_CGROUP_NET_PRIO: enabled
  • CONFIG_CFS_BANDWIDTH: enabled
  • CONFIG_FAIR_GROUP_SCHED: enabled
  • CONFIG_RT_GROUP_SCHED: enabled
  • CONFIG_IP_VS: enabled
  • CONFIG_IP_VS_NFCT: enabled
  • CONFIG_IP_VS_RR: enabled
  • CONFIG_EXT4_FS: enabled
  • CONFIG_EXT4_FS_POSIX_ACL: enabled
  • CONFIG_EXT4_FS_SECURITY: enabled
  • Network Drivers:
    • “overlay”:
      • CONFIG_VXLAN: enabled
        Optional (for encrypted networks):
        • CONFIG_CRYPTO: enabled
        • CONFIG_CRYPTO_AEAD: enabled
        • CONFIG_CRYPTO_GCM: enabled
        • CONFIG_CRYPTO_SEQIV: enabled
        • CONFIG_CRYPTO_GHASH: enabled
        • CONFIG_XFRM: enabled
        • CONFIG_XFRM_USER: enabled
        • CONFIG_XFRM_ALGO: enabled
        • CONFIG_INET_ESP: enabled
        • CONFIG_INET_XFRM_MODE_TRANSPORT: enabled
    • “ipvlan”:
      • CONFIG_IPVLAN: enabled
    • “macvlan”:
      • CONFIG_MACVLAN: enabled
      • CONFIG_DUMMY: enabled
    • “ftp,tftp client in container”:
      • CONFIG_NF_NAT_FTP: enabled
      • CONFIG_NF_CONNTRACK_FTP: enabled
      • CONFIG_NF_NAT_TFTP: enabled
      • CONFIG_NF_CONNTRACK_TFTP: enabled
  • Storage Drivers:
    • “aufs”:
      • CONFIG_AUFS_FS: missing
    • “btrfs”:
      • CONFIG_BTRFS_FS: enabled
      • CONFIG_BTRFS_FS_POSIX_ACL: enabled
    • “devicemapper”:
      • CONFIG_BLK_DEV_DM: enabled
      • CONFIG_DM_THIN_PROVISIONING: enabled
    • “overlay”:
      • CONFIG_OVERLAY_FS: enabled
    • “zfs”:
      • /dev/zfs: missing
      • zfs command: missing
      • zpool command: missing

Limits:

  • /proc/sys/kernel/keys/root_maxkeys: 1000000

nvidia@tegra-ubuntu:~/bin$ docker info
Containers: 4
Running: 1
Paused: 0
Stopped: 3
Images: 6
Server Version: 1.12.6
Storage Driver: devicemapper
Pool Name: docker-179:33-2899445-pool
Pool Blocksize: 65.54 kB
Base Device Size: 10.74 GB
Backing Filesystem: ext4
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 450.8 MB
Data Space Total: 107.4 GB
Data Space Available: 27.04 GB
Metadata Space Used: 1.192 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.146 GB
Thin Pool Minimum Free Space: 10.74 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
WARNING: Usage of loopback devices is strongly discouraged for production use. Use --storage-opt dm.thinpooldev to specify a custom block storage device.
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.110 (2015-10-30)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.38-jetsonbot-doc-v0.3
Operating System: Ubuntu 16.04 LTS
OSType: linux
Architecture: aarch64
CPUs: 4
Total Memory: 3.888 GiB
Name: tegra-ubuntu
ID: GGQY:ZUKT:AEXF:NPL2:JDFZ:UHGJ:7XVI:PXVI:FQK2:F6MZ:PP4A:PEVD
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8


nvidia@tegra-ubuntu:~/docker/dq$ docker run --device=/dev/nvhost-ctrl --device=/dev/nvhost-ctrl-gpu --device=/dev/nvhost-prof-gpu --device=/dev/nvmap --device=/dev/nvhost-gpu --device=/dev/nvhost-as-gpu -v /usr/lib/aarch64-linux-gnu/tegra:/usr/lib/aarch64-linux-gnu/tegra device_query
/cudaSamples/deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: “NVIDIA Tegra X1”
CUDA Driver Version / Runtime Version 8.0 / 8.0
CUDA Capability Major/Minor version number: 5.3
Total amount of global memory: 3981 MBytes (4174815232 bytes)
( 2) Multiprocessors, (128) CUDA Cores/MP: 256 CUDA Cores
GPU Max Clock rate: 998 MHz (1.00 GHz)
Memory Clock rate: 13 Mhz
Memory Bus Width: 64-bit
L2 Cache Size: 262144 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 32768
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 1 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: Yes
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Domain ID / Bus ID / location ID: 0 / 0 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = NVIDIA Tegra X1
Result = PASS

I just executed

sudo apt-get install docker.io

on my TX1 and got the following error:

nvidia@tegra-ubuntu:~$ sudo apt-get install docker.io
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apt-clone archdetect-deb dmeventd dmraid dpkg-repack gir1.2-timezonemap-1.0
  gir1.2-xkl-1.0 kpartx kpartx-boot libappstream3 libdebian-installer4
  libdevmapper-event1.02.1 libdmraid1.0.0.rc16 liblockfile-bin liblockfile1
  liblvm2app2.2 liblvm2cmd2.02 libmircommon5 libparted-fs-resize0 libreadline5
  lockfile-progs lvm2 os-prober pmount python3-icu python3-pam rdate
  ubiquity-casper ubiquity-ubuntu-artwork ubuntu-core-launcher
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  aufs-tools debootstrap docker-doc rinse zfs-fuse | zfsutils
The following NEW packages will be installed:
  docker.io
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/9,223 kB of archives.
After this operation, 53.6 MB of additional disk space will be used.
Selecting previously unselected package docker.io.
(Reading database ... 194483 files and directories currently installed.)
Preparing to unpack .../docker.io_1.12.6-0ubuntu1~16.04.1_arm64.deb ...
Unpacking docker.io (1.12.6-0ubuntu1~16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu19) ...
Setting up docker.io (1.12.6-0ubuntu1~16.04.1) ...
addgroup: The group `docker' already exists as a system group. Exiting.
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2017-10-06 18:34:35 UTC; 26ms ago
     Docs: https://docs.docker.com
  Process: 25151 ExecStart=/usr/bin/dockerd -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE)
 Main PID: 25151 (code=exited, status=1/FAILURE)
      CPU: 297ms
   CGroup: /system.slice/docker.service

Oct 06 18:34:34 tegra-ubuntu systemd[1]: Starting Docker Application Contain....
Oct 06 18:34:34 tegra-ubuntu dockerd[25151]: time="2017-10-06T18:34:34.26151..."
Oct 06 18:34:35 tegra-ubuntu dockerd[25151]: time="2017-10-06T18:34:35.33394..."
Oct 06 18:34:35 tegra-ubuntu dockerd[25151]: time="2017-10-06T18:34:35.95570..."
Oct 06 18:34:35 tegra-ubuntu systemd[1]: docker.service: Main process exited...E
Oct 06 18:34:35 tegra-ubuntu systemd[1]: Failed to start Docker Application ....
Oct 06 18:34:35 tegra-ubuntu systemd[1]: docker.service: Unit entered failed....
Oct 06 18:34:35 tegra-ubuntu systemd[1]: docker.service: Failed with result ....
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package docker.io (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu19) ...
Errors were encountered while processing:
 docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don’t know about docker, but it is usually an error on the part of the package maintainer to activate a service upon install if configuration is required to make the service work. That message says docker is run as a service via systemctl, and that startup failed…the installation looks like it was ok. Do whatever configuration is needed, then try to start docker.

Examples to see or use docker:

sudo systemctl status docker.service
sudo systemctl start docker.service
sudo systemctl stop docker.service
sudo systemctl disable docker.service
sudo systemctl enable docker.service

Thanks for your reply.

Here is the output of those commands which you mentioned:

nvidia@tegra-ubuntu:~$ sudo systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: e
   Active: failed (Result: exit-code) since Sun 2017-10-08 20:28:32 UTC; 23s ago
     Docs: https://docs.docker.com
 Main PID: 22437 (code=exited, status=1/FAILURE)

Oct 08 20:28:30 tegra-ubuntu systemd[1]: Starting Docker Application Container E
Oct 08 20:28:30 tegra-ubuntu dockerd[22437]: time="2017-10-08T20:28:30.950454000
Oct 08 20:28:32 tegra-ubuntu dockerd[22437]: time="2017-10-08T20:28:32.029422000
Oct 08 20:28:32 tegra-ubuntu dockerd[22437]: time="2017-10-08T20:28:32.571201000
Oct 08 20:28:32 tegra-ubuntu systemd[1]: docker.service: Main process exited, co
Oct 08 20:28:32 tegra-ubuntu systemd[1]: Failed to start Docker Application Cont
Oct 08 20:28:32 tegra-ubuntu systemd[1]: docker.service: Unit entered failed sta
Oct 08 20:28:32 tegra-ubuntu systemd[1]: docker.service: Failed with result 'exi

nvidia@tegra-ubuntu:~$ sudo systemctl start docker.service
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
nvidia@tegra-ubuntu:~$ sudo systemctl stop docker.service
nvidia@tegra-ubuntu:~$ sudo systemctl disable docker.service
Synchronizing state of docker.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable docker
insserv: warning: current start runlevel(s) (empty) of script `docker' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `docker' overrides LSB defaults (0 1 6).
nvidia@tegra-ubuntu:~$ sudo systemctl enable docker.service
Synchronizing state of docker.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable docker
insserv: warning: current start runlevel(s) (empty) of script `docker' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `docker' overrides LSB defaults (0 1 6).

nvidia@tegra-ubuntu:~$ docker
Usage: docker [OPTIONS] COMMAND [arg...]
       docker [ --help | -v | --version ]

A self-sufficient runtime for containers.

Options:

  --config=~/.docker              Location of client config files
  -D, --debug                     Enable debug mode
  -H, --host=[]                   Daemon socket(s) to connect to
  -h, --help                      Print usage
  -l, --log-level=info            Set the logging level
  --tls                           Use TLS; implied by --tlsverify
  --tlscacert=~/.docker/ca.pem    Trust certs signed only by this CA
  --tlscert=~/.docker/cert.pem    Path to TLS certificate file
  --tlskey=~/.docker/key.pem      Path to TLS key file
  --tlsverify                     Use TLS and verify the remote
  -v, --version                   Print version information and quit

Commands:
    attach    Attach to a running container
    build     Build an image from a Dockerfile
    commit    Create a new image from a container's changes
    cp        Copy files/folders between a container and the local filesystem
    create    Create a new container
    diff      Inspect changes on a container's filesystem
    events    Get real time events from the server
    exec      Run a command in a running container
    export    Export a container's filesystem as a tar archive
    history   Show the history of an image
    images    List images
    import    Import the contents from a tarball to create a filesystem image
    info      Display system-wide information
    inspect   Return low-level information on a container, image or task
    kill      Kill one or more running containers
    load      Load an image from a tar archive or STDIN
    login     Log in to a Docker registry.
    logout    Log out from a Docker registry.
    logs      Fetch the logs of a container
    network   Manage Docker networks
    node      Manage Docker Swarm nodes
    pause     Pause all processes within one or more containers
    port      List port mappings or a specific mapping for the container
    ps        List containers
    pull      Pull an image or a repository from a registry
    push      Push an image or a repository to a registry
    rename    Rename a container
    restart   Restart a container
    rm        Remove one or more containers
    rmi       Remove one or more images
    run       Run a command in a new container
    save      Save one or more images to a tar archive (streamed to STDOUT by default)
    search    Search the Docker Hub for images
    service   Manage Docker services
    start     Start one or more stopped containers
    stats     Display a live stream of container(s) resource usage statistics
    stop      Stop one or more running containers
    swarm     Manage Docker Swarm
    tag       Tag an image into a repository
    top       Display the running processes of a container
    unpause   Unpause all processes within one or more containers
    update    Update configuration of one or more containers
    version   Show the Docker version information
    volume    Manage Docker volumes
    wait      Block until a container stops, then print its exit code

Run 'docker COMMAND --help' for more information on a command.


nvidia@tegra-ubuntu:~$ docker build -t openhorizon/caffe-tx1 .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/nvidia/Dockerfile: no such file or directory

So docker is there, but the service won’t start due to errors (the package which installed this should not have enabled docker since docker seems to require configuration in order to start). I believe the errors are that docker was not configured. You’ll probably have to research what configuration is needed before “sudo start docker.service” works.

You’ll see in the start command the failure shows you might get more information if you run this:

sudo journalctl -xe

If someone here has configured docker before they might be able to tell you more about where to start with docker configuration.

If you are having problems with Docker starting you need to first verify that the kernel you are running can support Docker. Docker has a script that you can use to verify that your kernel has the correct options enabled. You can find that script here: https://github.com/moby/moby/blob/master/contrib/check-config.sh

Hi,

The comment #2 is based on branch rel-24.2, which is installed with JetPack3.0.
If you are with JetPack3.1, please enable the required kernel configuration first.

Check this topic for more details:
https://devtalk.nvidia.com/default/topic/1000224/jetson-tx2/docker-on-the-tx2/post/5117731/#5117731

Thanks.

Hi, I have tried the config file from https://github.com/frankjoshua/buildJetsonTX2Kernel/ but it seems do not work. The Image can not be built successfully. Do you know how to get right config for tx1 to use docker?

Hi,

We have upgraded our branch from rel-27.1 to rel-28.1.
The patch can’t be used directly. Please following the modification, enable the corresponding kernel flag.

Thanks.

Hi, thank you for your reply. I successfully install docker in the “JetPack 3.0”
However, because we need “JetPack 2.2.1” 32bit system in TX1, could it possible to install docker on this version of JetPack? What should I do to make it work?

Hi,

You can check it via this command:

sudo apt-get install docker.io

There is an armhf docker package although we don’t have too much experience on it.
If you can’t install it by default, this topic can give you some hint to enable the required kernel flag.

Thanks.

Hi all,
I am desperately trying to get docker to run in TX2 / Jetpack 3.1. No luck.
I followed the steps listed in this thread: https://devtalk.nvidia.com/default/topic/1000224/jetson-tx2/docker-on-the-tx2/post/5117731/#5117731.
After I run getKernelSources.sh, stop the kernel editor and copy the config file, the build stats to ask me a set of configuration things. I do not know how respond to them (I pressed enter to all).
when I run makeKernel.sh I am getting this errors:

In file included from include/linux/platform/tegra/mc.h:22:0,
                 from drivers/../../t18x/drivers/platform/tegra/mc/tegra18_emc.c:17:
include/linux/platform/tegra/tegra_mc.h: In function ‘mc_get_carveout_info’:
include/linux/platform/tegra/tegra_mc.h:77:10: error: ‘ENODEV’ undeclared (first use in this function)
  return -ENODEV;
          ^
include/linux/platform/tegra/tegra_mc.h:77:10: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:261: recipe for target 'drivers/../../t18x/drivers/platform/tegra/mc/tegra18_emc.o' failed
make[5]: *** [drivers/../../t18x/drivers/platform/tegra/mc/tegra18_emc.o] Error 1
scripts/Makefile.build:406: recipe for target 'drivers/../../t18x/drivers/platform/tegra/mc' failed
make[4]: *** [drivers/../../t18x/drivers/platform/tegra/mc] Error 2
scripts/Makefile.build:406: recipe for target 'drivers/../../t18x/drivers/platform/tegra' failed
make[3]: *** [drivers/../../t18x/drivers/platform/tegra] Error 2
scripts/Makefile.build:406: recipe for target 'drivers/../../t18x/drivers/platform' failed
make[2]: *** [drivers/../../t18x/drivers/platform] Error 2
scripts/Makefile.build:406: recipe for target 'drivers/../../t18x/drivers' failed
make[1]: *** [drivers/../../t18x/drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
  GZIP    kernel/config_data.gz
  CHK     kernel/config_data.h
  UPD     kernel/config_data.h
  CC      kernel/configs.o
In file included from include/soc/tegra/tegra_powergate.h:21:0,
                 from drivers/ata/tegra/ahci_tegra.c:20:
include/linux/tegra-powergate.h:74:19: error: redefinition of ‘tegra_powergate_is_powered’
 static inline int tegra_powergate_is_powered(int id)
                   ^
In file included from drivers/ata/tegra/ahci_tegra.h:30:0,
                 from drivers/ata/tegra/ahci_tegra.c:17:
include/soc/tegra/pmc.h:131:19: note: previous definition of ‘tegra_powergate_is_powered’ was here
 static inline int tegra_powergate_is_powered(int id)
                   ^
In file included from include/soc/tegra/tegra_powergate.h:21:0,
                 from drivers/ata/tegra/ahci_tegra.c:20:
include/linux/tegra-powergate.h:101:19: error: redefinition of ‘tegra_powergate_remove_clamping’
 static inline int tegra_powergate_remove_clamping(int id)
                   ^
In file included from drivers/ata/tegra/ahci_tegra.h:30:0,
                 from drivers/ata/tegra/ahci_tegra.c:17:
include/soc/tegra/pmc.h:146:19: note: previous definition of ‘tegra_powergate_remove_clamping’ was here
 static inline int tegra_powergate_remove_clamping(int id)
                   ^
include/soc/tegra/pmc.h:64:29: error: expected identifier or ‘(’ before numeric constant
 #define TEGRA_POWERGATE_SOR 17
                             ^
include/soc/tegra/tegra_powergate.h:28:12: note: in expansion of macro ‘TEGRA_POWERGATE_SOR’
 extern int TEGRA_POWERGATE_SOR;
            ^
scripts/Makefile.build:261: recipe for target 'drivers/ata/tegra/ahci_tegra.o' failed
make[3]: *** [drivers/ata/tegra/ahci_tegra.o] Error 1
scripts/Makefile.build:406: recipe for target 'drivers/ata/tegra' failed
make[2]: *** [drivers/ata/tegra] Error 2
scripts/Makefile.build:406: recipe for target 'drivers/ata' failed
make[1]: *** [drivers/ata] Error 2
Makefile:973: recipe for target 'drivers' failed
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

Of course, the new kernel image is never generated, so when I run copyImage.sh I am geting:
“cp: cannot stat ‘arch/arm64/boot/Image’: No such file or directory”

Could someone help me here?
Thank you,
Regards,
mtorre

I found a solution in this link:
https://github.com/Technica-Corporation/Tegra-Docker
I followed the steps (took me a good while) but at the end I could install docker in my Jetson TX2.
Cheers!
mtorre