1

I have a docker application. It is running fine on IBM zCX docker environment. Every time the LPAR is IPLed and zCX reboots, I will have to start my docker container manually. I checked the getting started guide for IBM zCX. It does not talk about how to start the docker application when zCX boots up every-time.

On Linux, I used either init.d or systemd service to auto-start my docker containers.

What is the recommended way to autostart the docker container when zCX server comes up?

1 Answer 1

1

You just need to specify --restart option in the docker run command.

Every time, the Docker engine will be starting (so at zCX boot time), it will automatically restart the container.

Sign up to request clarification or add additional context in comments.

2 Comments

I think, you are referring to - docs.docker.com/config/containers/… ``` docker run -d --restart unless-stopped redis ```
Yes. Or "docker run -d --restart always redis" for uncontional restart.when Docker daemon restarts.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.