chucknorris / roundhouse

RoundhousE is a Database Migration Utility for .NET using sql files and versioning based on source control
http://projectroundhouse.org
916 stars 249 forks source link

Docker container switching to debian slim in 1.2.2 breaks installation of common db related packages #410

Closed kieranbenton closed 3 years ago

kieranbenton commented 3 years ago

Hi, Apologies in advance, I'm not sure if these are even distributed by you (bit of hunting couldn't tell me conclusively one way or the other) - but thought it was best to flag here.

The new 1.2.2 docker image (https://hub.docker.com/layers/dotnetroundhouse/roundhouse/1.2.2/images/sha256-854467d4535d80a2cb929607427458f9bcabff6585e04570a9c5ce50b0c4655d?context=explore) has broken our build this morning as its not possible to install the debian postgresql-client package on it. I assume this is because it has been switched to use debian-slim as a base image in order to reduce the overall distribution size.

Right now I've just pinned our build back to 1.0.2 to avoid the problem, as my quick workarounds (https://github.com/debuerreotype/debuerreotype/issues/10) weren't working and I need to get on with other things. Not sure what you see as being the solution to this? I would say the expectation of installing postgresql-client is reasonable (we use it with a bootstrap script to make sure databases exist and to optionally drop them before running roundhouse in order to build and destroy QA environments quickly).

Cheers, Kieran

erikbra commented 3 years ago

Hmmm... thanks for the report. Yes, it's me making the docker images, and here I thought I had been so clever... terribly sorry to break you setup.

So, just to understand better, you use the roundhouse docker image as a base image, creating a new image putting your own stuff on it (including the postgres-client)?

Have you tried the workaround in the issue you referenced? Does adding this line to your Dockerfile solve your problem?

https://github.com/debuerreotype/debuerreotype/issues/10#issuecomment-438342078

kieranbenton commented 3 years ago

Not a problem! It looked like a reasonable change to make - library is brilliant as well btw.

Yes, that's exactly the case - using the image as a base and adding a couple of things to it (principally just the postgres-client).

I did try the workaround, and whilst I only spent an hour on it I couldn't get it to work so moved on. No obvious reason why it wasn't, was consistently getting the same error.

Then I pinned the base image version back as I say and I was back in business.

erikbra commented 3 years ago

I think I'll close this one, as it's not a problem with roundhouse per se, but a problem/feature of the debian-slim image that makes it difficult to run Postgreql on it