Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you handle dependencies (images, networks, volumes), and if you do - how?

I'm of an opinion that Makefiles with Docker are mostly a fancy way to write `case "$1" in build) ... run) ... esac` except that one needs to have make(1) installed to run them (in my experience, Bourne shell is much more commonly available than any make variant)



I've generally had to only do this for more-or-less stand alone webservices, but there's nothing preventing making extra targets for setting up networks. To date, I'm still using docker compose for that.

I started doing makefiles as a reaction to having a bunch of bash scripts cluttering up my directory. More or less just a collection of useful commands. But as I continue to do this, I find it encourages making consistent build routines/versioning. Also, being able to set up dependencies ( like "run relies on build") can also be helpful. Finally, variable substitution is useful for versioning.

I think what makes makefiles great are you can do as much or as little as you want with them. I put an example of a common one in another reply.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: