-
Notifications
You must be signed in to change notification settings - Fork 29
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
Grpc web proxy client example #553
base: main
Are you sure you want to change the base?
Grpc web proxy client example #553
Conversation
We want to ensure that we can run both inside and outside the docker container, thus we better make sure that the repo inside and outside of the docker container use the same paths and permissions.
We were mapping the ports and the source into the docker image, but we were not mapping the certs out into the host. Without this the host could not connect as it had no valid certificates to check against.
When mounting in the repository, along with its target directory, we might have some issue if the host arch does not match the guest arch. We'd either use the host binary on the guest arch, or we end up compiling the guest into the host target dir, meaning the host won't work anymore. By moving the target dir into a separate directory we then don't touch the hosts' binaries.
a40fb4d
to
df04fc8
Compare
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.
Sorry for the slow response @ShahanaFarooqui, it seems I forgot to actually submit my comments 😅
@@ -208,5 +210,5 @@ gltestserver: gltestserver-image | |||
-e DOCKER_USER=$(shell whoami) \ | |||
--net=host \ | |||
-ti \ | |||
-v $(shell pwd)/.testserver:/tmp/gltestserver \ |
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.
Notice that with this you cannot run the test server outside of the test servers code itself, as it mounts its own code into the container as a volume. The goal here was to create a small shared island inside and outside, but otherwise leave the host directly untouched. This allows for users to use the test server for example from inside their projects repository, allowing them to test against GL.
|
||
# Force this target dir, so the scripts can find all the binaries. | ||
#ENV CARGO_TARGET_DIR=${REPO}/target | ||
ENV CARGO_TARGET_DIR=/tmp/target/ |
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.
This no longer deposita the artifacts in the shared island, and thus the host cannot access them after the container built them.
RUN uv run clnvm get-all | ||
CMD uv run gltestserver run --metadata /tmp/gltestserver |
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.
Good catch, I must've missed this one, as it also doesn't point to the shared island 👍
No description provided.