Docker image not able to stay alive in a Jenkins Kubernetes build pipeline
Unfortunately it's not possible since as you stated, argo
is the only command available on this image.
It can be confirmed here:
##################################################################################################### argocli####################################################################################################FROM scratch as argocliCOPY --from=argo-build /go/src/github.com/argoproj/argo/dist/argo-linux-amd64 /bin/argoENTRYPOINT [ "argo" ]
As we can see on this output, running argo is all this container is doing:
$ kubectl run -i --tty --image argoproj/argocli argoproj1 --restart=Never argo is the command line interface to ArgoUsage: argo [flags] argo [command]...
You can optionally create you own image based on that and include sleep, so it'll be possible to keep it running as in this example:
apiVersion: v1kind: Podmetadata: name: busybox namespace: defaultspec: containers: - name: busybox image: busybox:1.28 command: - sleep - "3600" imagePullPolicy: IfNotPresent restartPolicy: Always