docker-library / ruby

Docker Official Image packaging for Ruby
http://www.ruby-lang.org/
BSD 2-Clause "Simplified" License
590 stars 334 forks source link

Currently it's not possible to build an Image with ruby:1.9.3 #480

Open berti92 opened 4 days ago

berti92 commented 4 days ago

Currently it's not possible to build or run an image with ruby 1.9.3:

berti@Mac-mini-von-Berti musikerseiten % sudo docker run -it ruby:1.9.3
Password:
Unable to find image 'ruby:1.9.3' locally
docker: Error response from daemon: missing signature key.

I tried it with an Mac Mini with M1 and on an Ubuntu Server (24.04) with amd64

I know it's an old version, but maybe you could help me to get the app of my customer get running again.

LaurentGoderre commented 3 days ago

An image that old isn't compatible with the more recent docker engine.

jgzurano commented 1 day ago

Same with ruby:1.9.3-p551 on Ubuntu 22

$ docker -v
Docker version 24.0.7, build 24.0.7-0ubuntu2~22.04.1

$ docker pull ruby:1.9.3-p551
Error response from daemon: missing signature key

Seems like this error started to affect pulls recently, I was able to build with that image a few weeks ago (Oct 30th).

I was thinking of probably rebuilding the image from scratch, but couldn't find the source in this github repo.

Anywhere I can find the old Dockerfile used for this?

Also, is there any known workarounds to this pull error?

In the meantime, will look into: https://docs.docker.com/engine/deprecated/#pushing-and-pulling-with-image-manifest-v2-schema-1

Earlopain commented 1 day ago

Also see https://github.com/docker-library/ruby/issues/452

Dockerfiles are removed soon after their ruby reaches EOL. You will need to dig through git history to find the source from way back. https://github.com/docker-library/ruby/tree/069e9f5f9aa4903f4a3cb4baf6325d08d9d366e6 seems promising but who knows if that will still build with modern docker.

Likely the FROM entrypoint there has the same issue :shrug:

LaurentGoderre commented 1 day ago

While there is a fix coming, you can run the following script as a temporary workaround to get the image working (requires jq and crane)

image=ruby:1.9.3
layers=$(crane manifest $image | jq -r '.fsLayers[].blobSum')
echo $layers | xargs -I% sh -c "crane blob ruby@% > %.tar.gz"
echo "FROM scratch" > Dockerfile
echo $layers | xargs -I% sh -c "echo 'ADD %.tar.gz .' >> Dockerfile"
docker build -t $image .