Update Dockerfile
Some checks failed
ci / build (push) Has been cancelled

This commit is contained in:
richardrobertreitz 2025-03-15 12:11:54 +00:00
parent b66b6f953a
commit 3e4f90e1f5

View file

@ -14,9 +14,9 @@ RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -exec rm -rf {
# Stage 2 - Install dependencies and build packages
FROM node:20.18.1 AS build
# Required for macOS
# Required for arm64
RUN apt update -y
RUN apt install -y python3 make gcc build-essential
RUN apt install -y python3 make gcc build-essential bash
USER node
WORKDIR /app
@ -24,7 +24,7 @@ WORKDIR /app
COPY --from=packages --chown=node:node /app .
RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \
yarn install --network-timeout 600000
yarn install --frozen-lockfile --network-timeout 600000
COPY --chown=node:node . .
@ -52,7 +52,15 @@ RUN yarn config set python /usr/bin/python3
# Add kubectl for the kube apply plugin.
# Add cnoe-cli
# Add mkdocs for the TechDocs plugin.
RUN curl -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/v1.29.9/bin/linux/amd64/kubectl && chmod +x /usr/local/bin/kubectl
RUN if test "$(uname -m)" = "x86_64"; \
then \
curl -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/v1.29.9/bin/linux/amd64/kubectl; \
fi
RUN if test "$(uname -m)" != "x86_64"; \
then \
curl -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/v1.29.9/bin/linux/arm64/kubectl; \
fi
RUN chmod +x /usr/local/bin/kubectl
RUN curl -L -O https://github.com/cnoe-io/cnoe-cli/releases/download/v0.1.0/cnoe_Linux_x86_64.tar.gz && \
curl -L -O https://github.com/cnoe-io/cnoe-cli/releases/download/v0.1.0/checksums.txt && \
@ -83,7 +91,7 @@ WORKDIR /app
COPY --from=build --chown=node:node /app/yarn.lock /app/package.json /app/packages/backend/dist/skeleton/ ./
RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \
yarn install --production --network-timeout 600000
yarn install --frozen-lockfile --production --network-timeout 600000
# Copy the built packages from the build stage
COPY --from=build --chown=node:node /app/packages/backend/dist/bundle/ ./