Replies: 5 comments 18 replies
-
|
I have attempted, but unsuccessfully and unfortunately gave up a little while ago, but it was with a KVM image... I can't find any useful notes of what I did. I've since spent a few hours (way too many) fighting a Check Point FW to get the vagrant box up and running. It's possible I missed some steps when creating the vagrant box for the Citrix LB. Now, if there is a docker image, maybe I should reconsider... I will attempt to play with it, and share if I get somewhere! |
Beta Was this translation helpful? Give feedback.
-
|
I had some issues with the version 14, couldn't get to the webportal either, AI and I didn't understand what the problem was, something to do with Apache configuration maybe... Anyway, I tried with an older version of Netscaler, and I got there! Get the image:docker pull quay.io/netscaler/netscaler-cpx:13.1-59.22Run the container:docker run -dt -P --privileged=true -e EULA=yes --ulimit core=-1 --name cpx quay.io/netscaler/netscaler-cpx:13.1-59.22UsersGet the password for
|
Beta Was this translation helpful? Give feedback.
-
|
After the test above, I've now tested to create a new docker image from the container, and I can spin up the netscaler in the lab with a topology like this. First create a new docker image after doing the configuration: docker commit cpx noodleops/netscaler:13.1Now you should be able to run |
Beta Was this translation helpful? Give feedback.
-
Here is the dockerfile I am now using: FROM quay.io/netscaler/netscaler-cpx:13.1-59.22
ENV EULA=yes
# Build arguments for clab user credentials
ARG CLAB_USER=clab
ARG CLAB_PASSWORD=clab@123
ENV CLAB_USER=${CLAB_USER}
ENV CLAB_PASSWORD=${CLAB_PASSWORD}
# Create clab user (for SSH)
RUN useradd -m ${CLAB_USER} && echo "${CLAB_USER}:${CLAB_PASSWORD}" | chpasswd
# Create required directories
RUN mkdir -p /var/nstmp && \
chmod 777 /var/nstmp
# Provision script - create a user with superuser privileges
RUN (echo '#!/bin/bash'; \
echo "cli_script.sh \"add system user ${CLAB_USER} ${CLAB_PASSWORD} -promptString '%u@%h'\""; \
echo "cli_script.sh \"bind system user ${CLAB_USER} superuser 0\""; \
echo 'cli_script.sh "save ns config"') > /provision.sh && \
chmod +x /provision.sh
# nscli wrapper - allows user to enter nscli, already logged in
RUN (echo '#!/bin/bash'; \
echo "exec nscli -U 127.0.0.1:${CLAB_USER}:${CLAB_PASSWORD}") > /usr/local/bin/nscli-wrapper && \
chmod +x /usr/local/bin/nscli-wrapper
# Set nscli wrapper as default shell for user
RUN usermod -s /usr/local/bin/nscli-wrapper ${CLAB_USER}
# Entrypoint - runs startup and also provisioning if container is not already initialized
RUN (echo '#!/bin/bash'; \
echo 'if [ ! -f /initialized ]; then'; \
echo ' /var/netscaler/bins/docker_startup.sh &'; \
echo ' sleep 120'; \
echo ' /provision.sh'; \
echo ' touch /initialized'; \
echo 'else'; \
echo ' /var/netscaler/bins/docker_startup.sh'; \
echo 'fi'; \
echo 'wait') > /entrypoint.sh && \
chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 22 9080 9443To create your image you can either keep the default docker buildx build -t noodleops/netscaler:13.1-default .docker buildx build --build-arg CLAB_USER=cliuser --build-arg CLAB_PASSWORD=sEcrEtP4ssword -t noodleops/netscaler:13.1-custom .You can ignore the warning 2 warnings found (use docker --debug to expand):
- SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "CLAB_PASSWORD") (line 7)
- SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "CLAB_PASSWORD") (line 9) |
Beta Was this translation helpful? Give feedback.
-
@sdargoeuves I could merge #2742 right now (adding documentation on how to use it as a Linux node), or I could wait for you to add "netscaler" device, which would then automatically trigger the "you have to build the container first" warning. How do you want to proceed? |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
See https://docs.netscaler.com/en-us/cpx/current-release/deploy-using-docker-image-file.html
I can pull the image and launch it, but have difficulty reaching the web interface. Would appreciate a quick how-to
Beta Was this translation helpful? Give feedback.
All reactions