Skip to content

Commit

Permalink
docker: Installs dependencies okh-tool and sanitize-v1-yaml [fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
hoijui committed Dec 11, 2024
1 parent b44285c commit 06a9e5b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,35 @@ RUN install_packages \
build-essential \
libffi-dev \
libssl-dev \
tar \
wget \
&& \
pip install --no-cache-dir poetry==1.8.5

WORKDIR /usr/local/bin

RUN wget --quiet -O sanitize-v1-yaml \
"https://github.com/OPEN-NEXT/LOSH-OKH-tool/raw/refs/heads/master/run/sanitize-v1-yaml" && \
chmod +x sanitize-v1-yaml

# Set parameters like so:
# docker build \
# --build-arg okh_tool_release="0.5.3" \
# --build-arg some_other_var="bla/blu.bli" \
# .
ARG okh_tool_release=0.5.3

ENV OKH_TOOL_PKG="okh-tool-$okh_tool_release-x86_64-unknown-linux-musl"
ENV OKH_TOOL_DL="https://github.com/OPEN-NEXT/LOSH-OKH-tool/releases/download/$okh_tool_release/$OKH_TOOL_PKG.tar.gz"
RUN if ! [ -f okh-tool ] ; \
then \
wget --quiet "$OKH_TOOL_DL" && \
tar xf $OKH_TOOL_PKG.tar.gz && \
mv $OKH_TOOL_PKG/okh-tool ./ && \
rm $OKH_TOOL_PKG.tar.gz && \
rm -Rf $OKH_TOOL_PKG ; \
fi

WORKDIR /opt/krawler
COPY \
pyproject.toml \
Expand All @@ -35,6 +61,7 @@ RUN poetry config virtualenvs.in-project true && \
FROM bitnami/python:3.13-debian-12

WORKDIR /opt/krawler
COPY --from=builder /usr/local/bin/okh-tool /usr/local/bin/sanitize-v1-yaml /usr/local/bin/
COPY --from=builder /opt/krawler/ /opt/krawler/
COPY . /opt/krawler/
ENV PATH="/opt/krawler/.venv/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Expand Down

0 comments on commit 06a9e5b

Please sign in to comment.