Export Docker Container Settings as Docker Compose Stack

preview_player
Показать описание
In this video we'll do kind of the reverse of what we've been doing for a year or so. We're going to EXPORT a Docker container to a stack/docker compose file that can be deployed on a different server or just saved for redeployment if you ever have to rebuild your server.

This is the method shown in this video:

Join this channel to get access to perks:

The hardware in my current home server is:

More Home Server Videos:

/=========================================/

Remember to leave a like on this video and subscribe if you want to see more!

/=========================================/

Like what I do? Want to be generous and help support my channel? Here are some ways to support:

/=========================================/

Here's my Amazon Influencer Shop Link:

/=========================================/

Follow Me:
Рекомендации по теме
Комментарии
Автор

Why isnt this in Portainer by default? There should be a button when you view a container saying "generate new stack" that gives you a window to set a name for the stack, aswell as add additional containers to the stack.

Thanks for the video, this helps alot!

TwiggehTV
Автор

This is fantastic. I used to create containers directly in the past until I learned about stacks. I'll dump all my non stack containers as per the method you have described here and redeploy as stacks. That gives me flexibility to deploy it to a different endpoints configured in portainer.

rajivvishwa
Автор

This is really awesome. I'm trying to learn how to use Portainer from watching YT videos. This helps me understand how to do many things. Thank you. This is best video on YT for this subject.

PoeLemic
Автор

Thanks for this video. I had been using portainer to prototype a few services, and wanted to export everything so I could construct a single stack. The output wasn't perfect of course, but after about 45 minutes of comparing against the compose files I started with, I was able to find my additions (stuff I did via portainer ui), integrate them and assemble them into a single compose file!

rynofly
Автор

THANK YOU! I have been looking for a way to do this. Sure makes backing up the setup easier. Just can't remember all the changes when I have to redeploy a container.

bracketk
Автор

Thanks, great video instruction and gives the idea on how to do reverse docker-compose from an existing container

televisi
Автор

Interesting! You can add your “dbtech” user to the docker group with this command “sudo usermod -aG docker dbtech” so that you don’t have to put sudo each time in front of your docker commands.

TechNPLUS
Автор

Thanks for the demo and info. If you do a > [to file].yaml you can save the files directly. Have a great day

chrisumali
Автор

Just what I was looking for. Thanks. Would also be a good feature request for Portainer, to be able to just click an 'export container to docker-compose file' button.

mrbarrington-smythe
Автор

Thx very good way to save everything so you don't have to look everything up again. Really love your home server vids also. Learned a lot of it

gunterdevlieger
Автор

Combining the output of this and using codepal to help tidy some of the file up got me to a workable stack pretty fast thanks for the info

ajballa
Автор

You could write or append directly to a file by using '| tee file.txt' or '| tee -a file.txt' where file.txt will be in the current folder and be read

try-that
Автор

Been trying to figure out how to do docker compose with Portainer for awhile. Brilliant. Thanks!!

jimdavis
Автор

Great video as always and something I have often wanted to work out how to do. So confused about the difference between stacks and docker-compose files though!

andrewpndavies
Автор

great video great demonstation and comments

gregloin
Автор

thank you very much! really an epic video

cloudsystem
Автор

if only there was an armv7 build for raspberry pi. This is great though!

AtomEngineer
Автор

Nice video motivated me to build a home security lab as well, but I would like to ask you if you have any tools you used to monitor the network and the endpoints and containers in your lab. Could you please make a video to show that

iAbdulla_AJ
Автор

Thanks so much. Very useful. What's your preference on raising a stack? Do you prefer using Docker Compose, in the shell or adding the stack directly in Portainer?

Teleport
Автор

Just tried this but it doesnt work on the Pi4 (Arm processor). It's only for linux/amd64 :(

markloughtonUK