Skip to content

Commit 64cdc42

Browse files
committed
ci: add LLVM library path to LD_LIBRARY_PATH and GDB allowlist
1 parent 440fd3f commit 64cdc42

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

contrib/containers/ci/Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ RUN set -ex; \
6868
lldbUpdAltArgs="${lldbUpdAltArgs} --slave /usr/bin/${binName} ${binName} /usr/bin/${binName}-${LLVM_VERSION}"; \
6969
done; \
7070
sh -c "${lldbUpdAltArgs}";
71+
# LD_LIBRARY_PATH is empty by default, this is the first entry
72+
ENV LD_LIBRARY_PATH="/usr/lib/llvm-${LLVM_VERSION}/lib"
7173

7274
# Python setup
7375
# PYTHON_VERSION should match the value in .python-version
@@ -107,14 +109,15 @@ ARG DASH_HASH_VERSION=1.4.0
107109
RUN git clone --depth 1 --no-tags --branch=${DASH_HASH_VERSION} https://github.com/dashpay/dash_hash
108110
RUN cd dash_hash && pip3 install -r requirements.txt .
109111

112+
# Add user with specified (or default) user/group ids and setup configuration files
110113
ARG USER_ID=1000
111114
ARG GROUP_ID=1000
112-
113-
# add user with specified (or default) user/group ids
114-
ENV USER_ID="${USER_ID}"
115-
ENV GROUP_ID="${GROUP_ID}"
116-
RUN groupadd -g ${GROUP_ID} dash
117-
RUN useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash
115+
RUN set -ex; \
116+
groupadd -g ${GROUP_ID} dash; \
117+
useradd -u ${USER_ID} -g dash -s /bin/bash -m -d /home/dash dash; \
118+
mkdir -p /home/dash/.config/gdb; \
119+
echo "add-auto-load-safe-path /usr/lib/llvm-${LLVM_VERSION}/lib" | tee /home/dash/.config/gdb/gdbinit; \
120+
chown ${USER_ID}:${GROUP_ID} -R /home/dash
118121

119122
# Packages needed for all target builds
120123
RUN apt-get update && apt-get install $APT_ARGS \

0 commit comments

Comments
 (0)