Cannot uninstall Podman from CentOS 8 - docker

I have podman installed on a CentOS 8 machine. I want to switch to Docker so need to remove podman first because it conflicts with Docker.
However, when I try to remove it I get this:
Error:
Problem: The operation would result in removing the following protected packages: dnf, systemd, systemd-udev
Tried this and it didn't work:
https://www.ibm.com/docs/en/eam/4.2?topic=questions-troubleshooting-tips#uninstall_podman
buildah is not even installed
Tried with both yum and dnf - no go

solved by adding --allowerasing
sudo yum install docker-ce.x86_64 --allowerasing

Related

How to install docker correctly in ubuntu 22.04 is it possible at this time?

I am following the docker installation tutorial in ubuntu: https://docs.docker.com/desktop/linux/install/ubuntu/
And when I try this step: sudo apt install ./docker-desktop-4.8.1-amd64.deb I am getting the next error: E: Unsupported file ./docker-desktop-4.8.1-amd64.deb given on commandline
Not sure what that means or if I am missing something.
E: Unsupported file ./docker-desktop-4.8.1-amd64.deb given on commandline
I also tried with:
curl https://desktop-stage.docker.com/linux/main/amd64/74134/docker-desktop.deb --output docker-desktop.deb
sudo apt install ./docker-desktop.deb
And got the error:
E: Invalid archive signature
E: Internal error, could not locate member control.tar{.zst,.lz4,.gz,.xz,.bz2,.lzma,}
E: Could not read meta data from /home/rodolfo/docker-desktop.deb
E: The package lists or status file could not be parsed or opened.
Any ideas?
According to official documentation, and the steps I followed to install docker in Ubuntu 22.04 LTS
Visit the following site https://docs.docker.com/engine/install/ubuntu/
Scroll down until you find the Install using the convenience script section.
You will find the following commands:
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ DRY_RUN=1 sh ./get-docker.sh
the first command will install a shell script with the all needed commands and the other will run this shell script.
You can test the installation by running these commands
$ sudo docker --version
$ sudo docker info
If it looks fine, you now have docker in your machine.
Optional step is to download docker desktop for Ubuntu 22.04
https://docs.docker.com/desktop/linux/install/
MAKE SURE You already installed docker engine before installing docker desktop for Ubuntu
Try moving the DEB file to HOME folder or Change the directory in terminal to the folder where the file is downloaded
So I had the same problem and the solution was to go to the folder root that I downloaded the deb file in it wish is Downloads for me and I rerun the commend
My issue ended up being Ubuntu 22.04 was installed with wsl version 1.
wsl -l -v
NAME STATE VERSION
Ubuntu-22.04 Running 1
wsl --set-version Ubuntu-22.04 2

Cannot uninstall docker

I am trying to uninstall docker
The command I am using is:
sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli
The error I get:
E: Type '<!DOCTYPE' is not known on line 1 in source list /etc/apt/sources.list.d/nvidia-docker.list
E: The list of sources could not be read.
E: Type '<!DOCTYPE' is not known on line 1 in source list /etc/apt/sources.list.d/nvidia-docker.list
E: The list of sources could not be read.
I have uninstalled docker before but never ran into this. Does anyone know what this means?
I am using Ubuntu 20.04
Looks like /etc/apt/sources.list.d/nvidia-docker.list is corrupt.
Try manually deleting it, and then running the apt command again.
You're removing docker, so definitely won't need this entry any more

WSL: Can't install docker on WSL 2, Ubuntu 18.04

I've searched lots of related posts on here and other site but anything didn't solve my problem.
As mentioned on title I'm struggling to install docker on linux subsystem on window OS
I'm with win 10 home edition so I've already installed Docker tool box, and my wsl is version 2 with Ubuntu 18.04
I was following the instructions and everything was fine until I did:
~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
gpg: can't connect to the agent: IPC connect call failed
Is there anyone who had same difficulty but solved this problem?
Thank you in advance!
The issue is because of a real-time clock issue with the Glibc library under the WSL v1 setup. WSL v2 may fix this under the hood and you may not run into the issue in future.
Now you can fix Glibc manualy:
$ sudo add-apt-repository ppa:rafaeldtinoco/lp1871129
$ sudo apt update
$ sudo apt install libc6=2.31-0ubuntu8+lp1871129~1 -y
$ sudo apt-mark hold libc6
//Remove "-y" if needed on above step #3.
//And when asked, give "y" and hit enter.
The above set of commands will add the latest version of the Glibc library and put the stable library on hold, until needed to reenable.
You can track this issue https://github.com/microsoft/WSL/issues/5125

How to install standard system commands for amazon-linux 2

I seem to be missing some very basic utilities, namely the commands sudo and which seem to be missing. How can I install these, or even better is there an ami linux image which has all of these kind of things pre-installed.
Dockerfile:
FROM amazonlinux:2.0.20190823.1-with-sources
RUN echo $(which sudo)
Error:
/bin/sh: which: command not found
Or if I just try to use something like sudo yum
/bin/sh: sudo: command not found
Since it seems relevant, I also don't seem to have root permissions as trying to use the adduser command gives me a non zero response code of 2.
RUN yum update && yum install -y sudo, sudo is not installed in that image by default. you are already root in that images so you do not need sudo yum.
the idea from not installing too many packages by default ,is to let the image as small as possible and let the user install just what he needs

Yum install / update not working inside docker images but working otherwise from the centos machine

I am able to yum install, or yum update from the server, but when trying to do same (as specified in the Dockerfile) inside a docker container, it fails stating the following common error :
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
my Docker file is a simple :
FROM centos:centos7
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf
RUN echo "nameserver 8.8.4.4" >> /etc/resolv.conf
RUN yum -y update; yum clean all
RUN yum -y install epel-release; yum clean all
RUN yum -y install python-pip; yum clean all
I have tried various things like adding ip_resolve=4 in /etc/yum.conf, or addinf 8.8.8.8 and 4.4.4.4 to /etc/resolv.conf and other methods, in vain.
here's the docker info :
Containers: 28
Running: 0
Paused: 0
Stopped: 28
Images: 144
Server Version: 1.13.0
docker-compose version 1.10.1, build b252738
docker-py version: 2.0.2
CPython version: 2.7.5
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
Please help. I am only running things under a VPN, no proxy.
machine is an AMI : 3.10.0-514.el7.x86_64.
Need I add it's IP anywhere insde docker container? Please help.
TIA!

Resources