-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running alembic via the container image is problematic #72
Comments
I could easily add something to this like Env = [ "PATH=${pkgs.matrix-registration.alembic}/bin/" ]; and maybe also add a symlink for the ini to /data? Hmm the other nix approach might be to make a wrapper, e.g. I use this: {
matrix-registration-cli-wrapper = pkgs.stdenv.mkDerivation {
name = "matrix-registration-cli-wrapper";
buildInputs = [ pkgs.makeWrapper ];
buildCommand = ''
mkdir -p $out/bin
makeWrapper ${pkgs.matrix-registration}/bin/matrix-registration "$out/bin/matrix-registration" \
--add-flags "--config-path='${matrix-registration-config}'"
'';
};
} if I put both configured like that on the then I guess you would have to write out the entire command. as in |
I'm not sure I understand what the above nix configuration does, but anyway.. writing out the entire command sounds ( |
This is still quite broken. It's not to be used yet. Related to #1208
Because nix is used to build the container image, it's not easy to run alembic.
For
0.9.1
, thealembic
binary happens to be at/nix/store/lcbqvdllxb7lnrk85zq4pdl63yxdbb4z-python3.8-alembic-1.4.2/bin/alembic
. Seems like we need to set this as an--entrypoint
to invoke it.It appears that we also need to pass a config to it, which happens to live at
/nix/store/5q2rmk3i4cvjzb5x6s19s5gmv34gjpf6-python3.8-matrix-registration/alembic.ini
.Looks like we also need to run the
alembic
command with a working directory like/nix/store/5q2rmk3i4cvjzb5x6s19s5gmv34gjpf6-python3.8-matrix-registration
(passed todocker run
via-w
).In the end, I've gotten to a command like this:
Yet I still get some error like this:
So I'm guessing the command above needs even more work.
Is it possible to adjust the container-building script, so that it puts binaries (or symlinks to them) at a predictable path?
What would be the proper way to invoke
alembic
from a container image?Related to spantaleev/matrix-docker-ansible-deploy#1208
The text was updated successfully, but these errors were encountered: