3 ms·
Seems like a really strange article. This person doesn't like that you need to spend time Dockerizing your app but then writes this: > I would recommend that
by nickjj 9y ago
Seems like a really strange article.
This person doesn't like that you need to spend time Dockerizing your app but then writes this:
> I would recommend that a company look for chances where it can consolidate the number of technologies that it uses, and perhaps use modern languages and eco-systems that can do this kind of uber binary natively.
So you want me to re-write my 50,000 line Rails app into Go so I can ship a binary instead of Docker?
That doesn't seem reasonable, especially not when it takes literally 10 minutes to Dockerize a Ruby / Python / Node / "just about any language" app once you understand how Docker works.
That and most web applications aren't just your programming run-time or big fat binary. There's nginx, Postres, Redis, Elasticsearch and whatever other service dependencies your application needs.
I've been developing and deploying web applications for 20 years and for me Docker solves a ton of real world problems and am very thankful that it exists. Nothing that I've tried prior to Docker has made it this easy to get an app up and running consistently across multiple environments.
It also makes it super easy for me to keep my development environment in order which is important because I'm always hacking away on new side projects and need to keep a bunch of freelance related projects in total isolation with their own set of dependencies. Docker is perfect for that.
- M_Bakhtiari 9y ago> So you want me to re-write my 50,000 line Rails app into Go so I can ship a binary instead of Docker? Why can't you compile your Rails app into a binary? Genuine question, I haven't used Ruby in ages, but I don't see anything special about the language that would prevent this.
- yebyen 9y agoWell, there's Shoes.app which you can use to bundle your application into a vendor package, but there's not really any facility for obfuscating Ruby into executable static objects that I am aware of, neither why you would want it. A MacOS ".app" is just a folder with executables and supporting artifacts/objects in it. (So, quite a bit like a container actually!) I think you're being downvoted because you haven't asked "why" enough times. Why is it that you want a binary? What is it that a container image doesn't give you that you would get some other way by making a binary? Because a container image is, at least usually when translated to its simplest form, a binary (tarball) with an entrypoint (cmd). So what are you hoping to get out of a "compiled" Ruby app that you won't be getting when it's simply Dockerized?
- RVuRnvbM2e 9y agoYou can. You can use this tool called "docker", which nicely bundles all your dependencies with your code, ensures every deployment is identical, and even makes it easy to use kernel-enforced resource isolation.
- darkarmani 9y agoToo bad you have terrible disk IO and problems when your code expects that it has a normal Posix filesystem and logs into the overlay system.
- nickjj 9y ago> Too bad you have terrible disk IO and problems when your code expects that it has a normal Posix filesystem and logs into the overlay system. It depends I suppose. I run Docker for Windows on a 4 year old computer with an SSD and those 50,000 line Rails apps have plenty of speed in development. Rails picks up code changes in about 100ms. Basically it takes longer for me to move my eyes to my browser and hit reload than it does for a Dockerized Rails app to reload the code changes. Flask, Phoenix and Node apps are similarly fast. In production this is a non-issue because the code isn't mounted.
- philipodonnell 9y ago> it takes literally 10 minutes to Dockerize a Ruby / Python / Node / "just about any language" app once you understand how Docker works. Is there a good reference for "dockerizing" a typical hobbyist/MVP node.js+express+babel+webpack application that would make sense to someone who understands docker and what it is used for but hasn't waded into dockerfiles and the more technical parts? Just to get a simple Ubuntu webserver set up with all the ports exposed correctly and the apps running.
- nickjj 9y agoI have an example Rails repo set up that covers setting up a web app, background worker, Postgres and Redis with Docker. Feel free to use the Dockerfile as inspiration for your Node app. The source for that app template is available at https://github.com/nickjj/orats/tree/master/lib/orats/templates/base https://github.com/nickjj/orats/tree/master/lib/orats/templa.... I think it's worth the effort into learning the Docker and Docker Compose specifics because those skills are what will let you create the files you want. Basically it comes to down to how you would end up setting those things up without Docker, and then transforming those steps into a Dockerfile. If you want to get up to speed with Docker and Docker Compose quickly (but not specifically webpack) I do have an online course available at https://diveintodocker.com/ https://diveintodocker.com/.
- philipodonnell 9y agoThanks for the links!