server icon indicating copy to clipboard operation
server copied to clipboard

Created shell devcontainer for a reproducable build environment

Open CyberAustin opened this issue 3 months ago • 7 comments

The intent (hope) is to have a reproducible build environment for the server so that there's consistent results.

CyberAustin avatar Sep 20 '25 11:09 CyberAustin

Hi, thanks for the contribution. I am a little hesitant on this as I am not too into the devcontainers thing.

While I personally likes to work on my host environment I can understand alternative opinions, this is not a blocking issue. Just want to hear about the intended goal.

Can you tell me the primary frustration/friction you want to solve here? Is it the dev environment setup being not intuitive to setup, or the build themselves are not reproducible?

While attempting to help close issue #845 that I opened, I found myself unable to build the docker images or even the binary in many different environments. I'm not a developer by trade, so I felt that a reproducible dev environment was something that was within my capabilities to contribute to the project. If it is not something needed or wanted by the core development team, then feel free to reject it. It will not hurt my feelings.

CyberAustin avatar Sep 20 '25 13:09 CyberAustin

Does this devcontainer have to be microsoft's ? Can we use docker.io/gotify/build (and just install dev tools on top of it?)

Feels more reproducible if that is the goal

eternal-flame-AD avatar Sep 20 '25 14:09 eternal-flame-AD

I don't see why not. I can certainly implement that and test it out.

CyberAustin avatar Sep 20 '25 14:09 CyberAustin

Updated to the gotify build base image. Had to implement a Dockerfile to install npm/yarn.

CyberAustin avatar Sep 20 '25 16:09 CyberAustin

Don't merge this yet. I'm still working through some Dev Container-ism to try and get everything running smoothly.

CyberAustin avatar Sep 20 '25 21:09 CyberAustin

Yea I think this needs some thinking though, we kind of already roll our own "dev container" in Makefile, our official build commands are already through Docker. So if we just naively do a wrapper it is just docker in docker.

I wish there can be at least a plan forward where eventually we converge into one way of doing "reproducibility"

eternal-flame-AD avatar Sep 20 '25 22:09 eternal-flame-AD

Well I'm going to keep poking at this and maybe come up with something the main devs will like. Either way, it'll be a good learning experience for me.

CyberAustin avatar Sep 20 '25 22:09 CyberAustin