How to Build Docker Images with Ansible on Ubuntu 20.04

preview_player
Показать описание
Building docker images is traditionally completed using a docker file and bash scripts. Today I would like to introduce using configuration management tools to complete this task. Ansible has long been used to build Other types of images and Hosts but has started to get forgotten about in the world of containers. Building an image with Ansible provides numerous benefits compared to the traditional build process.

Docker documentation:

Github Repo for video:
Рекомендации по теме
Комментарии
Автор

I'm not sure why your channel does not have more subs.. I watched this video months ago came back to refresh somethings and noticed the subs count.. Your videos are good man makes no sense... But! keep them coming.

geogmz
Автор

Gday Joe, some great ideas there. I love ansible, and see this as a cool way of building custom images with dependancies. Thanks for donating your time making such awesome videos please keep it up. JB, Sydney AU

Frogstomp_actual
Автор

Great video, exactly what I was looking for.. I suscribed, looking forward for more videos

FinepixF
Автор

Hi Joe! Really like the smooth and humble vibes of your videos and obviously the content as well. I would definitely be down for a video where you also include ansible-vault into this formula. I work for the health body of my provincial government (I'm Canadian eh) and we are actually using that formula as it promotes building infrastructure as code - it's a solid formula if you ask me. We are for instance deploying kakfa clusters (that includes a zookeeper cluster) that way. Jenkins/Docker/Ansible is a very powerful workflow combination imo. Cheers from Quebec, Canada. I subbed and hopefully I will get to pick your brain at some point.

rockdarko
Автор

Do I understand it correctly that we only used Python and Rsync in order for Ansible to execute the "synchronization steps" and "enable nginx" steps within the docker container? That appears to me to be a significant overhead. Especially, when we always need to install and remove packages just to perform individual operations with ansible for a container.

alivecoding
Автор

Hey Joe
Thanks for such an informative and supportive video...
just had a question since u have the website already built-in. what happens with ur this code where there is no website pre-built or in the other ways if there is no website? thanks

MehdiQasimi-bg
Автор

A nice option where you also could use your playbook would by to call it in combination with vagrant . Of course without the docker. Commands.

matthiasmorath
Автор

Thanks, Joe! I walked through the ansible setup and when I tried to run the container, I was getting 'connection reset' in my browser. I looked in the container and noticed that nginx wasn't running. I commented out 'command: tail -f /dev/null' in the playbook and nginx starts as one would expect. I'm a bit green to this so maybe I'm missing something but thought I'd give you and anyone else a heads up what worked for me. Thanks again!

lakelse
Автор

@ 7:40 you can just do " docker build . -t <image-name> " at your pwd.

preetham
Автор

Does "apt" depend on Python3 to be installed?

alivecoding
Автор

Also never update your images to the latest unless needed. This can cause issues in production. Not a good practice.

preetham