Hello team, I am using args
in statefulset to run command that I want to run parallel with default entrypoint command of docker image, but it is replacing the entrypoint command with what I mentioned for args
. Is there a way to run the custom command along with default Entrypoint command that gets triggered from docker image?
Try with env
variables, to update the args
and then run tests.
If you want to run two processes in a pod, then you need to start two containers.
I want to run two process in same container, one process would be the default entrypoint of docker image and another process is command that I am trying to run through args:
.
can u please share some example, how it will work with env variable not with command I mention?
This is how I am using:
- name: {{ .Release.Name }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
image: 'image_name'
args:
- /bin/sh
- -c
- <some sed command that I want to run>```
so according to documentation it should take `args` along with default entrypoint of docker image, but here it is getting replaced with what I am passing.
you could execute a shell script like this:
command1 &
command2```
But I don't recommend that.
containers:
- name: your-container
image: your-docker-image:tag
command: ["/bin/sh"]
args: ["-c", "your-default-entrypoint-command && your-custom-command"]
This is not tested though, you could give it a try```