Skip to content

Commit 31534cd

Browse files
committed
testserver: Move the target dir to /tmp/
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.
1 parent 9db428f commit 31534cd

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docker/gl-testserver/Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ ENV PATH=$PATH:/home/$DOCKER_USER/.local/bin/:/opt/bitcoin/bin:/home/$DOCKER_USE
1515
ENV REPO=$REPO_PATH
1616

1717
# Force this target dir, so the scripts can find all the binaries.
18-
ENV CARGO_TARGET_DIR=$REPO/target
18+
#ENV CARGO_TARGET_DIR=${REPO}/target
19+
ENV CARGO_TARGET_DIR=/tmp/target/
1920

2021
RUN apt update && apt install -qqy \
2122
curl \
@@ -57,6 +58,9 @@ RUN cd /tmp/ && \
5758
RUN mkdir -p ${REPO_PATH} && \
5859
chown $DOCKER_USER:users ${REPO_PATH}
5960

61+
ADD ../../libs/ ${REPO_PATH}/libs
62+
ADD ../../pyproject.toml ${REPO_PATH}/
63+
6064
ADD ../../ ${REPO_PATH}/
6165
RUN chown $DOCKER_USER:users -R ${REPO_PATH}
6266
RUN chown $DOCKER_USER:users -R /home/$DOCKER_USER
@@ -69,10 +73,13 @@ RUN curl \
6973
-s -- -y --default-toolchain ${RUST_VERSION}
7074
RUN rustup default stable
7175

72-
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
73-
7476
WORKDIR ${REPO_PATH}/libs/gl-testserver/
7577

78+
RUN cargo build --bin gl-plugin
79+
RUN cargo build --bin gl-signerproxy
80+
81+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
82+
7683
RUN uv sync --locked -v
7784
RUN uv run clnvm get-all
7885
CMD uv run gltestserver run --metadata ${REPO}/ --directory ${REPO}/.gltestserver

0 commit comments

Comments
 (0)