Nbelles commented on PR #499:
URL: https://github.com/apache/guacamole-server/pull/499#issuecomment-2033390356

   I had looked into this methodology and I like the idea of doing the logic 
directly in the `.Dockerfile` but the downside to this approach is that I don't 
see a way for a user to easily build it themselves without forcing them to 
determine their target platform and specify it to the `docker buildx build ...` 
command. 
   
   One route would be to use the `TARGETPLATFORM` argument which then forces 
all users who want to build the container themselves to use the `docker buildx 
build ...` command to build the `.Dockerfile`. The build command that pushes 
images to the docker hub would have to be updated as well. This would also mean 
the documentation would need to get updated to include instructions on how to 
build with `docker buildx build ...` because I do not believe that is common 
knowledge, as compared to the normal `docker build ...` command. We could also 
create a short script that determines the target platform and passes that to 
the `docker buildx build ...` command to make it easier for users to use this 
method but I think this is more work than the method used in the above commit. 
   
   The other route (as prescribed in the above commit) would be to override any 
erroneous build options that the platform doesn't support. Then a user could 
put desired options (potentially incorrectly) in the `.Dockerfile` and the 
`build-all.sh` file would account for any discrepancies between what is 
selected and what is required for the platform. We could add some additional 
logic to check the variables and print some warning about any inconsistent 
build options that are being overridden if that helps. 
   
   I personally prefer the latter option so that the build process is easy for 
users (albeit slightly more complex on the backend) but I'm open to hearing 
what others think about this tradeoff. 
   
   Note: The reason I think being able to build the docker image yourself is so 
important is that for anyone who develops their own extensions and wants to run 
them in docker (such as myself), there is currently no easy way to build the 
jar file and load it into the docker image with guacamole properties passed 
through without building the image yourself. I hope to create another pull 
request in the near future that allows for easy jar file and guacamole 
properties loading using the docker hub provided images. 
   
   (I still plan to verify the provided commit works as expected shortly)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to