-apt-get install -y curl jq netcat docker.io=${DOCKERVERSION}
-apt-get install -y kubernetes-cni=${CNIVERSION}
-apt-get install -y --allow-unauthenticated kubeadm=${KUBEVERSION} kubelet=${KUBEVERSION} kubectl=${KUBEVERSION}
+
+
+if [ -z ${DOCKERVERSION} ]; then
+ apt-get install -y --allow-change-held-packages --allow-unauthenticated --ignore-hold docker.io
+else
+ apt-get install -y --allow-change-held-packages --allow-unauthenticated --ignore-hold docker.io=${DOCKERVERSION}
+fi
+systemctl enable docker.service
+
+if [ -z ${CNIVERSION} ]; then
+ apt-get install -y --allow-change-held-packages --allow-unauthenticated --ignore-hold kubernetes-cni
+else
+ apt-get install -y --allow-change-held-packages --allow-unauthenticated --ignore-hold kubernetes-cni=${CNIVERSION}
+fi
+
+if [ -z ${KUBEVERSION} ]; then
+ apt-get install -y --allow-change-held-packages --allow-unauthenticated --ignore-hold kubeadm kubelet kubectl
+else
+ apt-get install -y --allow-change-held-packages --allow-unauthenticated --ignore-hold kubeadm=${KUBEVERSION} kubelet=${KUBEVERSION} kubectl=${KUBEVERSION}
+fi
+