Docker Image Build Fail

Please, I am trying to build a docker image found in an online article. The image is supposed to install just the dplyr package. This is the Dockerfile:

FROM rocker/r-ver:4.0.0
RUN install2.r --error dplyr

But when I run the command docker build --tag dplyr_image . in my terminal, I get the error message below:

C:\Users\IFEANYI\Documents\docker> docker build --tag dplyr_image .
[+] Building 701.6s (6/7)
 => [internal] load build definition from Dockerfile                                                                0.0s
 => => transferring dockerfile: 31B                                                                                 0.0s
 => [internal] load .dockerignore                                                                                   0.0s
 => => transferring context: 2B                                                                                     0.0s
 => [internal] load metadata for docker.io/rocker/r-ver:4.0.0                                                       6.4s
 => [auth] rocker/r-ver:pull token for registry-1.docker.io                                                         0.0s
 => ERROR [1/2] FROM docker.io/rocker/r-ver:4.0.0@sha256:5a3409c3ae64e33c4939bd6d8bfa9c054666fe82dee59c6a67d408a  695.1s
 => => resolve docker.io/rocker/r-ver:4.0.0@sha256:5a3409c3ae64e33c4939bd6d8bfa9c054666fe82dee59c6a67d408a3ddb117f  0.0s
 => => sha256:9eac0320fbdbb623418233dbf8702bd2ed15499c1fc8dc2394306e04071c5da7 0B / 272.59MB                      695.1s
 => => sha256:80b0e2a2366bb0bcbbdf1502879233f97ba58daf9b4d037dac7bffecb022d9e8 19.99kB / 19.99kB                    1.4s
 => => sha256:5a3409c3ae64e33c4939bd6d8bfa9c054666fe82dee59c6a67d408a3ddb117fa 1.37kB / 1.37kB                      0.0s
 => => sha256:595bd0949fbff610c586a6cc94fdf9d042ce14102e11e453c35fda38a1c6e840 5.27kB / 5.27kB                      0.0s
 => => sha256:9e94a6d55f0b8b6eba6f37a3f096832a1b74ddf0fb00b68cf4c080a35284ec2e 1.71kB / 1.71kB                      0.7s
 => => extracting sha256:9e94a6d55f0b8b6eba6f37a3f096832a1b74ddf0fb00b68cf4c080a35284ec2e                           0.0s
 => => sha256:bd2571e75cf52d1b4ce1e622718cf51bdbe982dff41164d4ac4499db9f29c240 13.63MB / 38.49MB                  695.1s
 => [auth] rocker/r-ver:pull token for registry-1.docker.io                                                         0.0s
------
 > [1/2] FROM docker.io/rocker/r-ver:4.0.0@sha256:5a3409c3ae64e33c4939bd6d8bfa9c054666fe82dee59c6a67d408a3ddb117fa:
------
failed commit on ref "layer-sha256:bd2571e75cf52d1b4ce1e622718cf51bdbe982dff41164d4ac4499db9f29c240": "layer-sha256:bd2571e75cf52d1b4ce1e622718cf51bdbe982dff41164d4ac4499db9f29c240" failed size validation: 14678359 != 38489027: failed precondition```

As always, I will greatly appreciate your advice.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.