Citrix NetScaler is a commercial load balancer that competes with open source load balancers, such as HAProxy and Nginx. NetScaler is available as a container as well, in a product version known as NetScaler CPX. Even better, there is a free version available, called CPX Express. For the rest of the blog post, I’m using my Mac laptop running OS X Sierra, and Docker for Mac (version 17.05.0-ce, build 89658be) .

CPX Express can be installed from the Docker Store:
$ docker pull store/citrix/netscalercpx:11.1-53.11

You should now have the CPX image available:
$ docker images store/citrix/netscalercpx
REPOSITORY                  TAG                 IMAGE ID                        
store/citrix/netscalercpx   11.1-53.11          267dfad3a03e               

Create a container from this image:
$ docker run -e EULA=yes -dt -p 22 -p 80 --name cpx  --cap-add=NET_ADMIN store/citrix/netscalercpx:11.1-53.11
275626b96389755a88362c8df3ae4851f13e45d22f502b29900612fc2da28444

Determine the SSH port of this running container:
$ docker port cpx 22
0.0.0.0:32849

Login to the NetScaler CPX using the id/password combination of ‘root/linux’:
$ ssh -p 32849 root@127.0.0.1 
The authenticity of host '[127.0.0.1]:32849 ([127.0.0.1]:32849)' can't be established.
ECDSA key fingerprint is SHA256:N3dlhNYbvYjOPkbt9ogrg2fwwUDWPVs8JwvLuE64/RQ.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[127.0.0.1]:32849' (ECDSA) to the list of known hosts.
root@127.0.0.1's password: 
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.19.0-39-generic x86_64)

Once logged in, you can execute almost any regular NetScaler CLI command by passing the command to the cli_script.sh script. For example:
root@275626b96389:~# <span class="skimlinks-unlinked">cli_script.sh</span> 'show ip'   
exec: show ip
    Ipaddress        Traffic Domain  Type             Mode     Arp      Icmp     Vserver  State
    ---------        --------------  ----             ----     ---      ----     -------  ------
1)  172.17.0.2       0               NetScaler IP     Active   Enabled  Enabled  NA       Enabled
2)  192.0.0.1        0               SNIP             Active   Enabled  Enabled  NA       Enabled
Done

In our next blog post, we’ll see how to exercise the CPX’s primary function: load balancing. Stay tuned!

networking banner synergy 2