I have a docker file with image which contain Debian.
because of vulnerabilities I tried to change version of open ssl in dockerfile.
the current used version 1.1.0j-1~deb9u1 im tried to install different version using:
RUN apt-get install openssl=1.1.0l-1~deb9u1
but I keep getting -
Reading package lists...
Building dependency tree...
Reading state information...
E: Version '1.1.0l-1~deb9u1' for 'openssl' was not found
what should I do to enable installation of different stable version.
Given your selection of the package version and based on the information from the debian package repository, I assume that your debian version is stretch. The following dockerfile worked for me:
FROM debian:stretch
RUN apt-get update
RUN apt-get install -y openssl=1.1.0l-1~deb9u1
After docker build -t debian-openssl .the installed openssl version can be verified like this:
$ docker run -t debian-openssl openssl version
OpenSSL 1.1.0l 10 Sep 2019
Related
I am trying to enable HTTP2 for my nginx and I have his dockerfile where I use debian:jessie docker image and I try to install nginx:
FROM debian:jessie
RUN apt-get update && apt-get install -y nginx
RUN nginx -v
Unfortunatelly, when running it, I see nginx version: nginx/1.6.2 and according to documentation HTTP2 is available on 1.9.5 or newer.
Why does it install 1.6.2 and not newer? And how can I update it?
Debian Jessie was released in 2015 and should no longer be used in any production system, as all kinds of support ended in 2020.
Usually, Debian does not provide upgraded versions of the packages they use. If you want to use more current packages, use either a more current version of Debian or a distribution with rolling releases
I am trying to build Ubuntu image with a possibility to build Docker images on it. The tool that I want to use for it is buildah. However when my docker build executes the installation command: sudo apt-get -y install buildah I get this error: Unable to locate package buildah. My base image is: Zulu OpenJDK from Azul. I can clearly see that the requested package is in the central Ubuntu repo so I really do not understand why it can not find it.
The problem is that the Zulu Dockerfile that you are using is based on Debian Buster (10.0), not Ubuntu. This is indicated by the first line of the file:
FROM debian:buster-slim
Looking at the buildah installation instructions on Github (https://github.com/containers/buildah/blob/master/install.md), we find that buildah is only available in the Bullseye testing branch for Debian not from the default package repo.
Edit your /etc/apt/sources.list file and append the following line:
deb http://deb.debian.org/debian testing main contrib non-free
Run sudo apt update and then you can install buildah using sudo apt-get install buildah
I'm facing an issue with my docker build.
I have a dockerfile as follow:
FROM python:3.6
RUN apt-get update && apt-get install -y libav-tools
....
The issue I'm facing is that I'm getting this error when building on ubuntu:20.04 LTS
E: Package 'libav-tools' has no installation candidate
I made some research and found out that ffmpeg should be a replacement for libav-tools
FROM python:3.6
RUN apt-get update && apt-get install -y ffmpeg
....
I tried again without any issue.
but when I tried to build the same image with ffmpeg on ubuntu:16.04 xenial I'm getting a message that
E: Package 'ffmpeg' has no installation candidate
after that, I replace the ffmpeg with libav-tools and it worked on ubuntu:16.04
I'm confused now why docker build is dependant on the host ubuntu version that I'm using and not the actual dockerfile.
shouldn't docker build be coherent whatever the ubuntu version I'm using.
Delete the the existing image and pull it again. Seems you have a old image which may have a different base OS and that is why you are seeing the issue
I am new at using Docker so this may be obvious for some. I am running Ubuntu 18.04TLS.
I want to install the package "python3-protobuf" inside an image. I try to do this with the following line in the Dockerfile:
...
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3-protobuf \
<some other packages to be installed>
...
When I run 'docker build -t myImageName', I get the message:
E: Unable to locate package python3-protobuf
There are many packages that I am installing but this is the only one that is creating a problem for me.
I know that the package name is correct because in the terminal, when I 'apt search' for it, it is found. Additionally, in the dockerfile I do the recommended 'update' and 'install' steps. So it should be finding it. Any ideas why it does not?
#banuj answered this question.
The package "python3-protobuf" became available from Ubuntu 18.04 and onward. The base image I took is using ubuntu 16.04.
I have two way to solve this:
Use a base image that is with ubuntu 18.04 (or later)
Use pip to install the package.
I ended up using option two.
I have Ubuntu 14.04 machine with me and I want to install Docker engine version 1.13.1. I want this version because I want to try docker compose and swarms.
In one of my other machine, I have 1.12.3 available which do not support 'docker stack'. I checked following link for install.
https://docs.docker.com/cs-engine/1.13/#install-on-ubuntu-1404-lts-or-1604-lts
I was able to execute till step number 3. When I check the option to install specifically version 1.13.1 or 1.13.0, it gives me error that no such package is available.
$ sudo apt-get install docker-ce=1.13.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package docker-ce
$ sudo apt-cache madison docker-engine
N: Unable to locate package docker-engine
Please help me install 1.13.1.
Thank you.
Section install from repositories doesn't work well. It seem that version 1.13.xx is not in the repos.
Issue
apt-get remove docker-engine
and then follow section use packages
basically it says to download package from packages-list and then e.g. sudo dpkg -i docker-engine_1.13.1_cs8-0_ubuntu-xenial_amd64.deb