-
Notifications
You must be signed in to change notification settings - Fork 644
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
GUACAMOLE-1374: Guacamole in Docker on ARM #499
Conversation
@Nbelles Thanks for putting this in. All pull requests and commits need to be associated and tagged with a Jira issue. In this case, you're in luck, because one already exists to cover this: https://issues.apache.org/jira/browse/GUACAMOLE-1374. If you could tag both the PR and your commit messages with "GUACAMOLE-1374:", that would be great. |
I think that should do the trick. I will also create a separate pull request shortly for the guacamole-client changes that need to be made to make that work on ARM as well. I think the next step towards providing ARM Docker images on Docker Hub would be to follow something like the direction provided by this Docker guide. I'm not sure how the Docker Hub build process for this repo is set up right now (I'm only seeing the code for building on pull request) but it seems like the next step would be to adjust the |
@Nbelles So you confirmed that the build behaves as expected when you specify both |
I have verified that the build process completes on ARM when the I have someone visiting me tomorrow that has a Windows computer that I will be able to verify that RDP still works as expected when those flags are set according to the commit. Will report back with those results late tomorrow evening. |
What about this: https://nielscautaerts.xyz/making-dockerfiles-architecture-independent.html In particular, using the TARGETPLATFORM build variable: https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope It seems like this would allow for actually conditionally setting the |
I had looked into this methodology and I like the idea of doing the logic directly in the One route would be to use the 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 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) |
I just confirmed that I was able to connect to a Windows machine with RDP successfully through guacamole 1.5.5 on ARM on a Raspberry Pi 5 with the suggested commit. |
@Nbelles Thanks for that detailed info. @mike-jumper or @jmuehlner Thoughts on this approach to modifying flags for the Docker build? |
src/guacd-docker/bin/build-all.sh
Outdated
# Determine any option overrides to guarantee successful build | ||
# | ||
|
||
export BUILD_ARCHITECTURE="$(arch)" # Determine architechutre building on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: architechutre
src/guacd-docker/bin/build-all.sh
Outdated
|
||
case $BUILD_ARCHITECTURE in | ||
armv6l|armv7l|aarch64) | ||
echo "Using ARM overrides" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These echo statements look useful for debugging this change, but not so useful for general usage. If you look at above logging examples like "Building $REPO_DIR @ $VERSION ..."
, it includes useful information that varies from build to build, where as "Using ARM overrides" is going to appear verbatim in the build output of every single ARM build ever, and also doesn't add any additional information that the output on line 103
isn't already telling you.
I'd just remove these last 2 log lines entirely.
I don't have an issue with this approach. |
@jmuehlner Thanks for catching the spelling error and I removed the extra print statements in the latest commit. |
Thanks for the cleanup! Note that your second commit message still needs a |
@jmuehlner Thanks for reminding me, should be squashed. |
@jmuehlner Good with it if you are... |
Looks good to me. |
Pull request based on discussion here.
It is difficult to dynamically determine build options based on a given architecture from within a Dockerfile without requiring manually passing in the architecture type as an argument during the build process. Instead, this proposed approach uses the fact that a build script is used to actually build the dependencies and checks the architecture there. With this information it generates a list of overrides which are appended to the end of the
install_from_git
functions. Options are processed in order so by appending them to the end, they will override any options provided in the main Dockerfile. This guarantees the build process succeeds (even if the user provides bad options in the Dockerfile).I have tested that it works on macOS (arch: amd64) and a Raspberry Pi 4 (arch: aarch64), open to hearing how it works on other architectures!