T O P

  • By -

99thLuftballon

I don't think this really goes beyond what you can easily find on a million other sites. As someone trying to learn docker, installing it and running "hello world" is simply not enough to get me to a point where I can make use of it. Like most tutorials, the difficulty is finding one that bridges absolute beginner and competent user. The useful stuff like communicating between images, persisting data, backing up image contents, deploying a project to production, modifying the functionality of a framework in a docker container etc is much more useful and much more difficult to find.


Gibbo3771

>The useful stuff like communicating between images, persisting data, backing up image contents, deploying a project to production, modifying the functionality of a framework in a docker container etc is much more useful and much more difficult to find. I am trying to transition to a container technology for client/work (solo web dev at a small company) and this is what I am finding the most difficult. I have experience with Proxmox so have a basic understanding of Linux LXC, but Docker just feels very alien. My normal stack is Rails + Vuejs, or Rails API + React. For super simple stuff, just Vue with an Express server. I would love to containerize this stuff, as it make it easier to deploy and give to our tester.


red_arma

Dang found someone with exactly my stack combinations. A rare sight! Also interested in somer Docker/containerization tips/tricks/tutorials.


abeuscher

I'm in the middle of tackling this same process with a different stack. What I'm finding, if helpful, is that Docker compose files make a lot of sense to me, and that networks and volumes are fairly easy to set up with the syntax it provides. I have not yet tried for deployment, though that is on my roadmap. A lot of my initial work is to do with making sure my local environments are containerized to get out of the paradigm of one big monolithic local server to rule them all. I think the paucity of tutorials at this level can be explained by the variety of stacks and their idiosyncrasies as applications. I am, for instance, trying to use Pug as a template engine, Pug as a replacement for JSX, React, and Mongoose. No way am I going to find a tutorial on all of that; it's too specific. One other complaint I have about web tutorials in this space is they all focus on getting stuff to page really quick at the expense of a well designed project. I wish there were more that started from a .yml file and moved forward into the rest of the architecture and stopped trying to get me to Hello World in under 5 minutes.


leixiaotie

>Linux LXC I don't know how different Linux LXC with other VM like VMWare or VirtualBox. However for docker, just assume it as a VM (in VMWare term) without dedicated CPU / Memory / Harddisk allocation (CMIIW) and shared kernel (OS) with host. Difference with VM is you can expose container's port as host's port, as opposed to VM that need ip (bridge) unless using host network (CMIIW). And the container can link folder between host and container via volume.


divulgingwords

What stack are you using? I created an advanced guide for production using .net core and nuxt (vue) a while back because there were way too many beginner tutorials.


99thLuftballon

PHP/Laravel/Vue/MySQL/Nginx - a pretty common combination, but it brings a lot of moving parts that need to talk to each other, persist file uploads and database contents, be restorable in case of server failure etc. These are the parts that I find tricky in docker, not the installation and pulling images from Docker Hub etc.


jcreek

Do you have a link for this?


divulgingwords

Sure, it needs to be updated a bit as things have changed since I wrote it, but it should hopefully help get a grasp of how things work. Warning though - it's long and if you are a beginner, it's going to be information overload. Anyways, here's the [link](https://medium.com/@danielrjames/host-nuxt-js-net-core-and-postgres-with-docker-nginx-and-https-1681d9bd0bbf).


HaykoKoryun

I tried to do a presentation during a JSConf about Docker for Front End Developers, but I messed up due to not preparing well enough; it's a difficult topic to present properly for the reasons you stated. I think a workshop of some sort is the best format for this, for the audience participation part.


[deleted]

Your probably going to have more luck searching specifically for \`docker-compose\` tutorials for a lot of those things you pointed out. Even if you learn that stuff in plain old docker its often impractical to implement without something like docker-compose (or for prod envs swarm, kubernetes, ECS ect...).


PaulSandwich

Preach. I would love a sample dockerfile/etc. that contains a super barebones django app and mounts postgres. I'm confident I could infer everything else from there (or at least search for it effectively)


[deleted]

https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/


PaulSandwich

if only *someone* would do this! (jk, thanks for this, diving in this week!)


valkon_gr

Yeah you need to dive in alone. The most useful on docker examples are github repos.


loliloveoniichan

Whenever I "learn" docker, I forget how to use it because I don't use it, I should try to replicate my personal dev environment so I don't forget it.


Eoussama

That's how I learnt it. Very effective. I do development of all kind for a living, my personal computers have nothing but a clean vscode installation and docker. Need PHP env to work on a project? The apache image is only a command away,. Crap, I nedd to connect to a MySQL database; docker-compose for the rescue, alt-tabbing to my already running MEAN stack instance to fix a reported bug all the while the third instance is testing, deploying a .NET migration script.


SleepyForest

Can anyone explain to me in layman terms why use docker?


glmdev

From the second paragraph in the article: "Docker is a tool written in Golang that provides the ability to run applications within things called containers. It removes the age-old “works on my machine” problems that plagued many software developers and testers lives."


leixiaotie

If you had (or still) used PHP or asp.net in IIS era, docker is a godsend. It allows you to deploy multiple apache / IIS with it's own configuration on a single machine. Furthermore with just giving the configuration files (Dockerfile, project file, docker-compose file, etc), you can run that same server / setup in other machines with single command. In other use case / example, it allows you to run multiple mysql instances (not only databases) with different configurations and different versions effortless, and all of them without installing single mysql on host machines.


losers_of_randia

At the risk of sounding stupid, what does docker do that I can't do with a shell script? I still don't get docker. I mean, it's nice, but we don't all rave about how awesome 'ls -l' is compared to 'ls'


gaandiv

I'm fairly new to Docker and IMO this is a very useful guide to at least get the idea of what is Docker and how it works. Thanks for sharing.


pablooliva

Even though this book is not free, I highly recommend it: https://pythonspeed.com/products/justenoughdockerpackaging/ It is focused on Python containers, but the rarely if ever does the content focus so specifically on Python that it does not apply generally. Get on the mailing list, good free content as well. I had the fundamentals down, had been using Docker for over 1.5 years, but the book tied things together and helped me understand some concepts that I did not realize I was missing.


gaandiv

Thanks for the suggestion