Docker Community Forums

Share and learn in the Docker community.

Backup docker run option

Hi Everyone,

I’m new with docker and sorry for my noob question.
I run a container with some custom options, so how can I backup them?
For example:
My last run:

docker run --name=test-containner
–restart=always
–publish=80:80:tcp
darklord20k/test-container

What I expect for next run:

docker run darklord20k/test-container

Or somehow I don’t need to remember define all those options

Thanks,

That’s where docker-compose commes into play. You define configurations in a yml file, which can allows reproducability and versionability of the file in a scm of your choice.

1 Like