Closed OnkelTem closed 6 years ago
Image should be built as dobi
image resources, not from the compose file. I do not want to support building with docker-compose
.
Image should be built as dobi image resources, not from the compose file. I do not want to support building with docker-compose.
What do you mean "support with docker-compose"? Is it in some way difficult to do it or what? You already run docker-compose up
, do you? So what's wrong with adding more such things? Or do you mean that you don't want to make Dobi better?
What do you mean "support with docker-compose"?
There is already a way to build images, it is the dobi image
resource. There's no reason to build using docker-compose build
.
I don't want to make it worse. Having two different ways to do the same thing makes it worse.
The better way to build images is to make dobi image resources.
@OnkelTem , @dnephin is right.
Before you used dobi, you were most likely using docker-compose to facilitate at least two things:
Long ago, I stopped using docker-compose to build my images because it didn't provide enough control over how the built images are named.
So, now that you're using dobi, you don't need to use the docker-compose build
directive. simply specify image
instead, and make dobi build the images to match.
Dobi provides more control over how your built images are named, which will give you more options in CI and your local development without overcomplicating the CLI interface for your fellow team members.
Please add a task to build compose resources used in
dobi.yaml
.Docker compose itself never rebuilds its images so if you develop images you have to manually rebuild them which involves:
-f
dobi.yaml
i.e.
Needless to say that if you mistype something or forget to provide project name you have pretty good chances to run into real problems with images versioning.
And all that could be replaced by just:
ALSO
Using this task we could write special aliases in
dobi.yaml
for building all the images as a preparation step before running jobs, e.g;This is especially important as images fetching/building takes a lot of time (tens of minutes or more) during which you basically sit and wait. So it's reasonable to separate steps of building and running.