From f8eb8264352cca80ff17ce97759a445f736023e4 Mon Sep 17 00:00:00 2001 From: Manabu McCloskey Date: Thu, 19 Sep 2024 15:33:51 +0000 Subject: [PATCH] merge apt commands. pin mkdoc version Signed-off-by: Manabu McCloskey --- Dockerfile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4ca64a3..472b6a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,7 +64,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ apt-get update && \ apt-get install -y --no-install-recommends libsqlite3-dev -# Add kubectl. +# Add kubectl for the kube apply plugin. +# Add mkdocs for the TechDocs plugin. RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt-get update && \ @@ -76,7 +77,13 @@ RUN curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | gpg --d RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt-get update && \ - apt-get install -y --no-install-recommends kubectl + apt-get install -y --no-install-recommends kubectl python3-pip python3-venv + +ENV VIRTUAL_ENV=/opt/venv +RUN python3 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" + +RUN pip3 install 'mkdocs-techdocs-core==1.6.1' # Add cnoe cli. RUN curl -L -O https://github.com/cnoe-io/cnoe-cli/releases/download/v0.1.0/cnoe_Linux_x86_64.tar.gz && \ @@ -89,14 +96,6 @@ RUN curl -L -O https://github.com/cnoe-io/cnoe-cli/releases/download/v0.1.0/cnoe COPY ./cnoe-wrapper.sh /usr/bin/cnoe RUN chmod +x /usr/bin/cnoe -RUN apt-get update && apt-get install -y python3 python3-pip python3-venv - -ENV VIRTUAL_ENV=/opt/venv -RUN python3 -m venv $VIRTUAL_ENV -ENV PATH="$VIRTUAL_ENV/bin:$PATH" - -RUN pip3 install mkdocs-techdocs-core - # From here on we use the least-privileged `node` user to run the backend. USER node