I created a container with a comprehensive list of volumes, network maps and environment variables.

Is there any way Portainer exports the container configuration or provide a Docker CLI command to create such container?

  • CameronDev@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I dont know if it can now, but it definitely couldnt a few years ago, and i havent seen anything for it recently.

    When i had the same issue, i tried this:

    ~~https://www.makeuseof.com/create-docker-compose-files-from-running-docker-containers/~~

    Edit: link has a very aggressive anti adblock, but the script is python-autocompose which the other poster has linked.

    It didnt work then, just generating a very basic outline, but maybe it has improved.

    On the upside, this is a mistake youll only make once, I just use compose for everything now, saves a lot of hassle down the line.