diff --git a/deployment/docker/common/semaphore-wrapper b/deployment/docker/common/semaphore-wrapper index be99c1ca..37609829 100755 --- a/deployment/docker/common/semaphore-wrapper +++ b/deployment/docker/common/semaphore-wrapper @@ -161,5 +161,13 @@ EOF echoerr "Run Semaphore with semaphore server --config ${SEMAPHORE_CONFIG_PATH}/config.json" fi +# Install additional python requirements +if [ -f "${SEMAPHORE_CONFIG_PATH}/requirements.txt" ]; then + echoerr "Installing additional python packages" + pip3 install --upgrade --user -r "${SEMAPHORE_CONFIG_PATH}/requirements.txt" +else + echoerr "No additional python packages to install" +fi + # run our command exec "$@" diff --git a/deployment/docker/prod/Dockerfile b/deployment/docker/prod/Dockerfile index 33fe4ce3..0f7743d5 100644 --- a/deployment/docker/prod/Dockerfile +++ b/deployment/docker/prod/Dockerfile @@ -10,7 +10,7 @@ RUN apk add --no-cache -U libc-dev curl nodejs npm git gcc g++ && \ FROM alpine:3.18 as runner LABEL maintainer="Tom Whiston " -RUN apk add --no-cache sshpass git curl ansible mysql-client openssh-client-default tini py3-aiohttp tzdata zip unzip tar && \ +RUN apk add --no-cache sshpass git curl ansible mysql-client openssh-client-default tini py3-aiohttp tzdata zip unzip tar py3-pip && \ adduser -D -u 1001 -G root semaphore && \ mkdir -p /tmp/semaphore && \ mkdir -p /etc/semaphore && \ diff --git a/deployment/docker/prod/buildx.Dockerfile b/deployment/docker/prod/buildx.Dockerfile index ca5cecbf..fadbf1a9 100644 --- a/deployment/docker/prod/buildx.Dockerfile +++ b/deployment/docker/prod/buildx.Dockerfile @@ -13,7 +13,7 @@ RUN ./deployment/docker/prod/bin/install ${TARGETOS} ${TARGETARCH} FROM alpine:3.18 as runner LABEL maintainer="Tom Whiston " -RUN apk add --no-cache sshpass git curl ansible mysql-client openssh-client-default tini py3-aiohttp tzdata && \ +RUN apk add --no-cache sshpass git curl ansible mysql-client openssh-client-default tini py3-aiohttp tzdata py3-pip && \ adduser -D -u 1001 -G root semaphore && \ mkdir -p /tmp/semaphore && \ mkdir -p /etc/semaphore && \