Closed Timoses closed 2 years ago
Hey @Timoses - thanks for this PR!
I'm unsure whether to merge this though. I'm currently using the Dockerfile with docker-box, which is basically opening a docker container in the current directory based on either a docker-compose.yml
or a Dockerfile
. With dr bash
I open this container and have the Rust compiler and toolchain available to work with.
I'm wondering how I could make this available for you and others as well. How much would it differ from keepass-diff to run in a container than as a direct executable, as it would still be able to inspect your passwords...?
Hey @Timoses - thanks for this PR! I'm unsure whether to merge this though. I'm currently using the Dockerfile with docker-box, which is basically opening a docker container in the current directory based on either a
docker-compose.yml
or aDockerfile
. Withdr bash
I open this container and have the Rust compiler and toolchain available to work with.
docker-box sounds like a not so popular tool (never heard of it). Further, it sounds like a kind of build tool you use?
In any way, it would be most practical if you had a container repository you would push your built images to.
I'm wondering how I could make this available for you and others as well. How much would it differ from keepass-diff to run in a container than as a direct executable, as it would still be able to inspect your passwords...?
It doesn't differ too much. Advantage: One does not have to install rust (only docker or podman).
With the alias defined in the README.md of this PR one would just have to cd
to the directory where the keepass-files are and can then execute it as one would with a normal system binary. (The alias uses -v $(pwd):/app
to mount the current working directory into the /app
directory in the container.
You could just as well create an extra Dockerfile, e.g. release.dockerfile (I prefer 'Containerfile' name as it is more general): release.containerfile
Then the docker command to build would be docker build -f release.containerfile
docker-box sounds like a not so popular tool (never heard of it). Further, it sounds like a kind of build tool you use?
Haha, yeah, that's because I've built it 😉 It's just a quick way to run Docker containers with the current working directory mounted. Basically, I don't have to install Rust, Node or whatever the project needs on my machine and can work with it in a Linux based container. I can also use it to containerize other tools with it so these tools are more or less sandboxed in the container environment.
It doesn't differ too much. Advantage: One does not have to install rust (only docker or podman). With the alias defined in the README.md of this PR one would just have to
cd
to the directory where the keepass-files are and can then execute it as one would with a normal system binary. (The alias uses-v $(pwd):/app
to mount the current working directory into the/app
directory in the container.
Ok, so this is basically what I do with docker-box, making only the current working directory available for the program.
Still, the tool could read all the passwords, so I guess there is not a big difference of how much trust you need to have in the program. I'm not sure whether you should give a tool like this the master password for your password database if you didn't see the source before to make sure it really does only what it says it does.
Getting a PR like this seems to me as if users want to have a more user-friendly way to use this tool and there is enough trust to run it more or less directly. Initially, I thought you should invest the time to read the source before using it and I also didn't really know how to create executables for all environments. I assume it could be done through GitHub actions now to build executable releases for all platforms and upload the artifacts as releases.
If you change the PR according to your suggestion (create release.containerfile
, update the doc) as you've suggested, I can merge it. It's probably a quick win before I'm able to figure out how to properly create a GitHub action that automatically creates releases
I've created it now myself, as I have seen more forks adding this part from docker now. I'll close this in favor of #40
Thanks again @Timoses for pushing for this!!
Optionally you could sync/push to a container registry.
Motivation: I personally prefer using containers for applications where I do not want to install the libraries for. This gives a quick way to use keepass-diff in a container.