# Start with a base Debian image
FROM python:3.13-rc-bookworm
ARG R_VERSION=4.4.1
# Set environment variables
ENV PYTHONUNBUFFERED 1
ENV DEBIAN_FRONTEND noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y
gnupg
wget
software-properties-common
dirmngr
&& rm -rf /var/lib/apt/lists/*
# Add R repository
RUN wget -qO- https://cloud.r-project.org/bin/linux/debian/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_debian_key.asc
&& add-apt-repository "deb https://cloud.r-project.org/bin/linux/debian bookworm-cran40/"
# Install R and other dependencies
RUN apt-get update && apt-get install -y
r-base=${R_VERSION}*
r-base-dev=${R_VERSION}*
bat
fd-find
libopenblas-dev
libcairo2-dev
libhdf5-dev
liblapack-dev
cmake
sudo
rclone
ripgrep
python3-pip
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install Python dependencies
# RUN pip3 install --no-cache-dir -r requirements.txt
# Make port 5000 available to the world outside this container
EXPOSE 5000
# Run app.py when the container launches
CMD ["python3", "app.py"]
I have tried above code to install R 4.1.1 version with python:3.13-rc-bookworm
and debian:bookworm-slim
as the base image, but every time I am getting this error
”
0.767 Package r-base-dev is not available, but is referred to by another package.
0.767 This may mean that the package is missing, has been obsoleted, or
0.767 is only available from another source
0.767
0.768 E: Version ‘4.4.1*’ for ‘r-base’ was not found
0.768 E: Version ‘4.4.1*’ for ‘r-base-dev’ was not found
“
What I can do here?
Neeraj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.