3 ms·
I'm not quite a novice but not a real developer by any means. I'm interested in learning more about containers and using them with my RoR side projects. Is thi
by shostack 10y ago
I'm not quite a novice but not a real developer by any means. I'm interested in learning more about containers and using them with my RoR side projects.
Is this new product a good place to start that would be relatively pain free for someone new to containers?
- skj 10y agoIf you're new to containers, I recommend starting by learning all about Dockerfiles. You can build them on your own machine, or with GCCB (using the `gcloud` command-line tool). Dockerfiles make it challenging to keep your build-time environment separate from the run-time environment. For instance, you need the JDK to build your java app, but only the much smaller JRE to run it. Or maybe you want to use bazel.io for building, and have a completely different base image in mind for your deployment. Or maybe you want to bring in a unit testing harness and not publish the image unless all the tests pass. Once these issues start to matter, GCCB has a great story. In essence, GCCB runs a series of containers with your source mounted in. So, you can run one step to run unit tests, another to build a binary, and a third to package everything into a container image. GCCB also will build as many containers as you want in a single execution, so if you have several microservices that are all versioned together, you can build them at the same time and give them a `:${REVISION_ID}` tag - useful for production rollouts.