Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
390 views
in Technique[技术] by (71.8m points)

docker - apt-get install can't find pinned versions within Dockerfile

During the building of a simple Dockerfile, the pinned version of apt-get install is never found and gives me the following output:

E: Unable to locate package ruby1.9.1-dev
E: Couldn't find any package by glob 'ruby1.9.1-dev'
E: Couldn't find any package by regex 'ruby1.9.1-dev'
E: Version '1.1.*' for 's3cmd' was not found

I am working according to the dockerfile best practices: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

Within there you can find a Dockerfile which has all apt-get recommendations within it:

FROM ubuntu:18.04
RUN apt-get update && apt-get install -y 
    aufs-tools 
    automake 
    build-essential 
    curl 
    dpkg-sig 
    libcap-dev 
    libsqlite3-dev 
    mercurial 
    reprepro 
    ruby1.9.1 
    ruby1.9.1-dev 
    s3cmd=1.1.* 
 && rm -rf /var/lib/apt/lists/*

I am running the docker build with:

docker build .

I haven't' found a solution to pin the versions in another way with apt-get install. Can someone recommend me how to do so?

question from:https://stackoverflow.com/questions/65915832/apt-get-install-cant-find-pinned-versions-within-dockerfile

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The ruby1.9.1 and ruby1.9.1-dev are not available for ubuntu:18.04.
You can find here the list of supported packages by ubuntu version.

You can also read this askubuntu question


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...