principledockerMinor
Build Design - Docker vs Fedora's Mock
Viewed 0 times
dockerdesignmockfedorabuild
Problem
This post is migrated from a reddit post. Parts in bold are to adopt it to SE's format.
I'm talking with companies to help streamline/combine their build process. They must do it together and their current processes are scary. We've convinced them to go with AWS/jenkins/bitbucket/artifactory.
Now one company wants to use fedora's mock for their build environment deps and build artifact management. Another wants to use docker for their build environment but does not have a build artifact solution yet.
I suggested a combination of docker (for build env deps) and mock (for product related artifacts and deps) to both. They scoffed at it. BTW one of the products is a custom rhel .iso.
-
What are the pros/cons for mock vs docker in the way the two companies are debating using them?
-
What about pros/cons for my proposal.. or if it is even a smart thing to do?
-
Any other suggested tools/build flow that may work better?
Ultimately I am interested in what is the best practice/most adopted method for doing this (build env deps mgmt/product artifact dep mgmt) in the industry that will have continued support and advancements?
I'm talking with companies to help streamline/combine their build process. They must do it together and their current processes are scary. We've convinced them to go with AWS/jenkins/bitbucket/artifactory.
Now one company wants to use fedora's mock for their build environment deps and build artifact management. Another wants to use docker for their build environment but does not have a build artifact solution yet.
I suggested a combination of docker (for build env deps) and mock (for product related artifacts and deps) to both. They scoffed at it. BTW one of the products is a custom rhel .iso.
-
What are the pros/cons for mock vs docker in the way the two companies are debating using them?
-
What about pros/cons for my proposal.. or if it is even a smart thing to do?
-
Any other suggested tools/build flow that may work better?
Ultimately I am interested in what is the best practice/most adopted method for doing this (build env deps mgmt/product artifact dep mgmt) in the industry that will have continued support and advancements?
Solution
Docker is going to be far more well-known than Mock. I consistently see Docker used during build in companies that I work for. I think I have seen Mock before, but only because I am a Fedora user.
However, Docker is not a build tool in of itself, so you can still use Mock inside a container. This is a great way to avoid the "snowflake" build server. By using Docker containers, your builds are consistent no matter what build tool you are using. You can standardise on Docker as a platform for builds, and leave developers to choose the best build tool (whether that's Mock or NPM).
The only other suggestion I'd have is to run the builds on a CI server, and Docker makes this really easy.
Here's one example of a company using Docker for builds (as well as tests and deploys).
However, Docker is not a build tool in of itself, so you can still use Mock inside a container. This is a great way to avoid the "snowflake" build server. By using Docker containers, your builds are consistent no matter what build tool you are using. You can standardise on Docker as a platform for builds, and leave developers to choose the best build tool (whether that's Mock or NPM).
The only other suggestion I'd have is to run the builds on a CI server, and Docker makes this really easy.
Here's one example of a company using Docker for builds (as well as tests and deploys).
Context
StackExchange DevOps Q#3595, answer score: 2
Revisions (0)
No revisions yet.