Skip to content

Commit c3c9c49

Browse files
committed
Move openssl env vars to shell scripts
1 parent f06132e commit c3c9c49

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

Dockerfile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,7 @@ RUN ln -s /usr/bin/python3.10 /usr/bin/python
4242
# https://github.com/rust-lang/rustup/issues/297#issuecomment-444818896
4343
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
4444
ENV PATH="${HOME}/.cargo/bin:${PATH}"
45-
46-
# Find OpenSSL paths, set environment variables, and persist them
47-
RUN OPENSSL_LIB_PATH=$(find / -name 'libssl.so*' 2>/dev/null | head -n 1) && \
48-
OPENSSL_LIB_DIR=$(dirname "$OPENSSL_LIB_PATH") && \
49-
OPENSSL_INCLUDE_PATH=$(find /usr -name 'ssl.h' 2>/dev/null | grep -v '/node/' | head -n 1) && \
50-
OPENSSL_INCLUDE_DIR=$(dirname "$OPENSSL_INCLUDE_PATH") && \
51-
echo "OPENSSL_LIB_DIR=$OPENSSL_LIB_DIR" && \
52-
echo "OPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR" && \
53-
echo "OPENSSL_STATIC=$OPENSSL_STATIC" && \
54-
export OPENSSL_LIB_DIR OPENSSL_INCLUDE_DIR
55-
56-
# Set the environment variables for future stages (persistent across containers)
57-
ENV OPENSSL_LIB_DIR=$OPENSSL_LIB_DIR \
58-
OPENSSL_INCLUDE_DIR=$OPENSSL_INCLUDE_DIR \
59-
OPENSSL_STATIC=1
45+
ENV OPENSSL_STATIC=1
6046

6147
# Download and unzip the github actions runner
6248
RUN mkdir actions-runner && cd actions-runner \

scripts/openssl.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
OPENSSL_LIB_PATH=$(find / -name 'libssl.so*' 2>/dev/null | head -n 1)
2+
OPENSSL_LIB_DIR=$(dirname "$OPENSSL_LIB_PATH")
3+
OPENSSL_INCLUDE_PATH=$(find /usr -name 'ssl.h' 2>/dev/null | grep -v '/node/' | head -n 1)
4+
OPENSSL_INCLUDE_DIR=$(dirname "$OPENSSL_INCLUDE_PATH")
5+
export OPENSSL_STATIC=1
6+
export OPENSSL_LIB_DIR="$OPENSSL_LIB_DIR"
7+
export OPENSSL_INCLUDE_DIR="$OPENSSL_INCLUDE_DIR"

scripts/start.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ source "${current_dir}/detector.sh"
1313
source "${current_dir}/config.sh"
1414
source "${current_dir}/notify.sh"
1515
source "${current_dir}/squire.sh"
16+
source "${current_dir}/openssl.sh"
1617

1718
# Env vars (docker-compose.yml)
1819
RUNNER_NAME="${RUNNER_NAME:-"$(instance_id)"}"

0 commit comments

Comments
 (0)