Open pulpdood opened 5 months ago
@tjholm @davemooreuws I just got the behaviour again when running the Nitric GitHub Action - not sure if something was cached?
thanks for raising this @pulpdood will re-open this issue and see if we can get to the bottom of it.
@pulpdood if you don't mind can you share your Dockerfile here as well.
The error is caused by trying to install r-base=4.4.0. For some reason after a while versions become no longer existing when trying to install them on debian. To fix this I removed the version and am installing just r-base.
# syntax=docker/dockerfile:1
FROM node:bookworm as build
ARG HANDLER
# Python and make are required by certain native package build processes in NPM packages.
RUN apt-get update -y && apt-get install -y openssl
RUN apt-get install -y build-essential libpq-dev
RUN apt-get install g++ make -y
RUN apt-get install -y python3 python3-pip
RUN yarn global add typescript @vercel/ncc
WORKDIR /usr/app
COPY package.json yarn.lock ./
COPY prisma ./prisma/
RUN yarn install --production --frozen-lockfile --cache-folder /tmp/.cache && \
rm -rf /tmp/.cache
COPY . .
RUN \
--mount=type=cache,target=/tmp/ncc-cache \
ncc build ${HANDLER} -s -o lib/ -e .prisma/client -e @prisma/client -t
FROM node:bookworm as final
WORKDIR /usr/app
# RUN apk update && \
# apk add --no-cache ca-certificates R && \
# update-ca-certificates
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
usrmerge \
ed \
less \
locales \
vim-tiny \
wget \
ca-certificates \
fonts-texgyre \
&& rm -rf /var/lib/apt/lists/*
RUN echo "deb http://http.debian.net/debian sid main" > /etc/apt/sources.list.d/debian-unstable.list \
&& echo 'APT::Default-Release "testing";' > /etc/apt/apt.conf.d/default \
&& echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/90local-no-recommends
# RUN ncc build ${HANDLER} -s -o lib/ -e
ENV R_BASE_VERSION 4.4.0
RUN apt-get update \
&& apt-get install -y -t unstable --no-install-recommends \
usrmerge \
libopenblas0-pthread \
littler \
libc-dev \
libfribidi-dev \
libharfbuzz-dev \
libfontconfig1-dev \
libsodium-dev \
r-cran-docopt \
r-cran-littler \
r-base=${R_BASE_VERSION}-* \
r-base-dev=${R_BASE_VERSION}-* \
r-base-core=${R_BASE_VERSION}-* \
r-recommended=${R_BASE_VERSION}-* \
&& chown root:staff "/usr/local/lib/R/site-library" \
&& chmod g+ws "/usr/local/lib/R/site-library" \
&& ln -s /usr/lib/R/site-library/littler/examples/install.r /usr/local/bin/install.r \
&& ln -s /usr/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
&& ln -s /usr/lib/R/site-library/littler/examples/installBioc.r /usr/local/bin/installBioc.r \
&& ln -s /usr/lib/R/site-library/littler/examples/installDeps.r /usr/local/bin/installDeps.r \
&& ln -s /usr/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
&& ln -s /usr/lib/R/site-library/littler/examples/testInstalled.r /usr/local/bin/testInstalled.r \
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds \
&& rm -rf /var/lib/apt/lists/*
COPY package.json yarn.lock ./
COPY prisma ./prisma/
COPY rc-science ./rc-science/
RUN yarn install --production --frozen-lockfile --cache-folder /tmp/.cache && \
rm -rf /tmp/.cache
RUN yarn prisma generate
COPY . .
COPY --from=build /usr/app/lib/ ./lib/
RUN Rscript -e "install.packages(c('RSQLite', 'plumber', 'dbplyr', 'tidyverse', 'jsonlite', 'lubridate', 'gam', 'randomForest', 'kknn', 'forecast', 'stringr', 'glmnet', 'caret', 'gbm', 'readxl', 'digest'), repos='https://packagemanager.posit.co/cran/__linux__/bookworm/latest', Ncpus=4)"
ENTRYPOINT ["node", "lib/index.js"]
I'll try and reproduce the error with that Dockerfile. @psymbio are you already taking a look at this one?
Bug Report
Issue
Nitric Up GitHub action still shows up as successful even though it appears the build failed.
Steps
Steps to reproduce the behavior:
Expected
Expect the GH Action Workflow to fail
Environment and setup information
Other info
Nil