I am trying to create a multi-arch image using python:3.9-slim-buster
as the base image. However, when I run the buildx
command, it runs into an error during the arm64 build phase:
> [linux/arm64 9/17] RUN apt-get install -y -f r-base:
#34 6.950 distribution that some required packages have not yet been created
#34 6.950 or been moved out of Incoming.
#34 6.950 The following information may help to resolve the situation:
#34 6.950
#34 6.950 The following packages have unmet dependencies:
#34 7.315 r-base : Depends: r-base-core (>= 4.2.2-1~bustercran.0) but it is not going to be installed
#34 7.315 Depends: r-recommended (= 4.2.2-1~bustercran.0) but it is not going to be installed
#34 7.315 Recommends: r-base-html but it is not going to be installed
#34 7.315 Recommends: r-doc-html but it is not going to be installed
#34 7.378 E: Unable to correct problems, you have held broken packages.
------
Dockerfile:18
--------------------
16 | # Install ASREML-R
17 | RUN apt install -y -t buster-cran40
18 | >>> RUN apt-get install -y -f r-base
19 |
20 | # install R packages
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get install -y -f r-base" did not complete successfully: exit code: 100
I am also including the Dockerfile and the buildx
command that I used:
# Dockerfile
FROM python:3.9-slim-buster
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONUNBUFFERED=1
ENV LOG_LEVEL info
#
RUN apt-get update
RUN apt-get install -y dirmngr gnupg apt-transport-https ca-certificates software-properties-common
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key '95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7'
RUN add-apt-repository 'deb http://cloud.r-project.org/bin/linux/debian buster-cran40/'
## Install supervisor
RUN apt-get update
RUN apt-get install -y supervisor
#ENV PATH="/app/scripts:${PATH}"
# Install ASREML-R
RUN apt install -y -t buster-cran40
RUN apt-get install -y -f r-base
# install R packages
RUN Rscript -e "install.packages('sommer')"
RUN Rscript -e "install.packages('RJSONIO')"
RUN Rscript -e "install.packages('gtools')"
ENV PYTHONPATH "${PYTHONPATH}:/app/"
WORKDIR /app/
COPY . /app/
RUN Rscript /app/packages/install_asreml.R
# RUN apt-get update && pip3 install -r requirements.txt
RUN pip3 install --upgrade setuptools
RUN pip3 install -r requirements.txt
ENTRYPOINT [ "./start-worker.sh" ]
Build command:
docker buildx build \
-t test/test-image:test \
--cache-from=type=registry,ref=test/test-image-build-cache \
--cache-to=type=registry,ref=test/test-image-build-cache,mode=max \
--push --platform linux/arm64/v8,linux/amd64 \
--progress=plain \
.
I already tried using a different (the latest) slim-buster image that is available and tried adding the marutter PPA repository to no avail.