2

I'm trying to run a Rscript in a docker container using a Linux environment. I have a Dockerfile which looks like this:

FROM arm32v7/ubuntu
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y r-base

Then in the same folder as the Dockerfile i run:

docker build -t armr .

which gives me the following message:

Sending build context to Docker daemon   16.9kB
Step 1/3 : FROM arm32v7/ubuntu
 ---> 612a7284cf7c
Step 2/3 : ENV DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 54d6525ea8e6
Step 3/3 : RUN apt-get update && apt-get install -y r-base
 ---> Running in 223af8c8164c
Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [101 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [109 kB]
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
  At least one invalid signature was encountered.
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
  At least one invalid signature was encountered.
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
  At least one invalid signature was encountered.
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
  At least one invalid signature was encountered.
Reading package lists...
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal InRelease' is not signed.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease' is not signed.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease' is not signed.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-security InRelease' is not signed.
The command '/bin/sh -c apt-get update && apt-get install -y r-base' returned a non-zero code: 100

I am on a Raspberry Pi 3 with Raspbian lite (buster).

I cleared out received packages which could possibly interfere, pruned my docker and tried it with apt-transport-https.

Any help, I am completely new to docker (or raspberry or R for that matter).

Ruben
  • 194
  • 2
  • 11
  • 1
    Does this answer your question? [Repository is not signed in docker build](https://stackoverflow.com/questions/59139453/repository-is-not-signed-in-docker-build) – Software Engineer Jan 29 '21 at 17:12
  • @SoftwareEngineer unfortunately it doesn't. I've already tried `sudo apt clean` and `docker prune` with no luck. – Ruben Jan 30 '21 at 09:22
  • If you don't care about the security risks, you can try to run the apt-get command with the --allow-unauthenticated or --allow-insecure-repositories – Software Engineer Jan 30 '21 at 10:18
  • @SoftwareEngineer I tried both, with the `--allow-insecure-repositories` tag, I get an altered error message. It now says for example _E: Release file for http://ports.ubuntu.com/ubuntu-ports/dists/focal/InRelease is not valid yet (invalid for another 18375d 17h 33min 7s). Updates for this repository will not be applied._ but other than that it's the same error message. – Ruben Jan 30 '21 at 20:07
  • So what's the problem? Not willing to wait for 50-years to get this working? Quitter!!! – Software Engineer Jan 30 '21 at 21:35
  • Using the dockerfile you have in the question, I've just run this command on my windows x86 laptop: `docker buildx build --platform linux/arm/v7 -t whatever .` and it works without any faults. Docker's `buildx` command allows building for different platforms, as you can see. I know that doesn't help a lot, but at least you now know that it is meant to work. – Software Engineer Jan 31 '21 at 08:23
  • @SoftwareEngineer, thanks for trying to help, I just can't seem to get it running. I now create the image on a different system and transfer it like in this post: [Copy docker images](https://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-using-a-repository) – Ruben Feb 01 '21 at 13:33
  • If you create a free account on hub.docker.com you can push your image up to that repo and just pull it from there onto the target system. It's quite easy and is the preferred approach. – Software Engineer Feb 01 '21 at 13:37

0 Answers0