Skip to content

Commit

Permalink
fix(cloud-native): resolve image builds on slow network (#10524)
Browse files Browse the repository at this point in the history
* fix(cloud-native): resolve image builds on slow network

Signed-off-by: iromli <isman.firmansyah@gmail.com>

* build(cloud-native): remove unnecessary pip's option

Signed-off-by: iromli <isman.firmansyah@gmail.com>

* ci: handle nightly image tag

* ci: update falsk cedarling source

---------

Signed-off-by: iromli <isman.firmansyah@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
  • Loading branch information
iromli and moabu authored Dec 31, 2024
1 parent 9610bc1 commit 3409098
Show file tree
Hide file tree
Showing 14 changed files with 74 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,5 @@ jobs:
images+="${tag}@${DIGEST} "
done
if [[ -n $images ]]; then
cosign sign --yes -a author=JanssenProject ${images}
cosign sign --yes -a author=JanssenProject ${images} || echo "Failed to sign images"
fi
9 changes: 6 additions & 3 deletions docker-jans-all-in-one/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ ENV JANS_SOURCE_VERSION=aa1b2edaa8d7e3413bd57a7bd7cc86206086768b

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand All @@ -72,11 +73,13 @@ RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/ja
# Python
# ------

# default pip timeout
ARG PIP_TIMEOUT=15
COPY /app/requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# -------
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-auth-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand All @@ -126,11 +127,13 @@ RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/ja
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# ==========
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-casa/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand Down Expand Up @@ -93,11 +94,13 @@ RUN cd /tmp/jans \
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# ==========
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-certmanager/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ ENV JANS_SOURCE_VERSION=aa1b2edaa8d7e3413bd57a7bd7cc86206086768b

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand All @@ -39,11 +40,13 @@ RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/ja
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# =======
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-config-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ ARG JANS_CONFIG_API_RESOURCES=jans-config-api/server/src/main/resources

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand Down Expand Up @@ -117,11 +118,13 @@ RUN cd /tmp/jans \
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# ==========
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-configurator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ RUN mkdir -p /opt/jans/configurator/javalibs \

ENV JANS_SOURCE_VERSION=aa1b2edaa8d7e3413bd57a7bd7cc86206086768b

RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand All @@ -39,11 +40,13 @@ RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/ja
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# =======
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-fido2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand Down Expand Up @@ -105,11 +106,13 @@ RUN wget -q https://www.apple.com/certificateauthority/Apple_WebAuthn_Root_CA.pe
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# ==========
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-kc-scheduler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ ENV JANS_SOURCE_VERSION=aa1b2edaa8d7e3413bd57a7bd7cc86206086768b

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand All @@ -52,11 +53,13 @@ RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/ja
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# =======
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-keycloak-link/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand Down Expand Up @@ -97,11 +98,13 @@ RUN cd /tmp/jans \
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# ==========
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-link/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand Down Expand Up @@ -97,11 +98,13 @@ RUN cd /tmp/jans \
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# ==========
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-saml/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand All @@ -65,11 +66,13 @@ RUN cd /tmp/jans \
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# =======
Expand Down
9 changes: 6 additions & 3 deletions docker-jans-scim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ ARG JANS_SCIM_RESOURCE_DIR=jans-scim/server/src/main/resources

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the assets
RUN git clone --depth 500 --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
ARG GIT_CLONE_DEPTH=100
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_SOURCE_VERSION} \
Expand Down Expand Up @@ -99,11 +100,13 @@ RUN cd /tmp/jans \
# Python
# ======

# default pip timeout
ARG PIP_TIMEOUT=15
COPY requirements.txt /app/requirements.txt
RUN mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.disabled \
&& python3 -m ensurepip \
&& pip3 install --no-cache-dir -U pip wheel setuptools \
&& pip3 install --no-cache-dir -r /app/requirements.txt \
&& pip3 install --no-cache-dir -U pip wheel setuptools --timeout ${PIP_TIMEOUT} \
&& pip3 install --no-cache-dir -r /app/requirements.txt --timeout ${PIP_TIMEOUT} \
&& pip3 uninstall -y pip wheel

# ==========
Expand Down
2 changes: 1 addition & 1 deletion jans-cedarling/flask-sidecar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN pip3 install "poetry==$POETRY_VERSION" gunicorn \
# ===============
# Project setup
# ===============
ENV JANS_SOURCE_VERSION=aa1b2edaa8d7e3413bd57a7bd7cc86206086768b
ENV JANS_SOURCE_VERSION=9610bc15908331e8344dfaed16ee8a397bd999d5

COPY docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
Expand Down

0 comments on commit 3409098

Please # to comment.