Marc Willhaus
Marc Willhaus

Reputation: 171

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?

Upvotes: 0

Views: 1828

Answers (1)

Max
Max

Reputation: 7090

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

Upvotes: 2

Related Questions