Installing docker on centos7: docker-engine-selinux conflicts with docker-selinux-* - docker

I tried installing docker from yum and from the install script on Centos7 and both of them give the same error:
Error: docker-engine-selinux conflicts with docker-selinux-1.10.3-44.el7.centos.x86_64
I am unable to figure out how to fix this and get docker installed.
Full error traceback:
[root#mynode]# wget -qO- https://get.docker.com/ | sh
/usr/bin/docker: line 13: /usr/bin/docker-latest: No such file or directory
sh: line 149: [: -lt: unary operator expected
sh: line 153: [: -le: unary operator expected
Warning: the "docker" command appears to already exist on this system.
If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.
If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.
You may press Ctrl+C now to abort this script.
+ sleep 20
+ sh -c 'sleep 3; yum -y -q install docker-engine'
Error: docker-engine-selinux conflicts with docker-selinux-1.10.3-44.el7.centos.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

yum list installed|grep docker
yum remove docker-selinux.x86_64

If top answer doesn't work, try yum remove docker-engine-selinux instead

Related

Check npm version in Docker

I have built an image with Dockerfile, it looks like this:
FROM node:12.18.1
USER root
RUN apt-get -y update
RUN apt-get -y install curl
RUN npm install
ENTRYPOINT ["curl"]
Now I can see that curl is installed, but how can I check on Node?
Every time I am trying to see the version I get an error:
'node'/'npm' is not recognized as an internal or external command,
I also tried this:
docker run -it --rm node /bin/bash -c 'node --version'
but ended up with this:
--version': -c: line 1: unexpected EOF while looking for matching `''
--version': -c: line 2: syntax error: unexpected end of file

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

Installing TaskCat using docker, and running taskCat errors out bash: taskcat: command not found

After installing docker successfully, and installing taskCat using docker,
$ curl -s https://raw.githubusercontent.com/aws-quickstart/taskcat/master/installer/docker-installer.sh | sh
When i run the below command
$ taskcat -c /ci/taskcat.yml
I get an error
"bash: taskcat: command not found"
Do a whereis taskcat, or use the find command or locate command to find the install location of the taskcat command.
The path variable for taskcat has not been setup, that maybe a reason why it says command not found.
Some commands get installed in the homedirectory/bin folder, this path is not included by default in the PATH variable.
You can do export PATH=$PATH:/home/myuserdir/bin to solve this issue.

install openstack magnum on docker

I installed openstack magnum (ocata release) on docker in my controller node because I have installed newton on my host machines and newton binaries did not install correctly but now when I try to run magnum-service list command the output is:
ERROR: Unable to establish connection to http://controller:9511/v1/mservices
then I checked both magnum-api and magnum-conductor logs and there was an error:
ERROR magnum ImportError: No module named profiler
then I tried:
su -s /bin/sh -c "/var/lib/magnum/env/bin/pip install profiler" magnum
but even after installing profiler the error was the same.
Can anyone help?
Tnx to #eandersson now both services are running successfully but I faced another problem and that is when I try to run:
magnum service-list
The result is:
ERROR: 'errors'
So I tried:
magnum --debug service-list
And the result was:
ERROR: 'NoneType' object has no attribute 'replace' (HTTP 500) (Request-ID: req-cbe3a389-1cea-49f6-8472-3275696a67e3)
You are probably missing osprofiler, not profiler
profiler = importutils.try_import("osprofiler.profiler")
profiler_initializer = importutils.try_import("osprofiler.initializer")
profiler_web = importutils.try_import("osprofiler.web")
Try installing it instead.
su -s /bin/sh -c "/var/lib/magnum/env/bin/pip install osprofiler" magnum
By the way, when pip installing something for OpenStack you should be applying the requirements constrains.
-c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata
So ideally your command would look like this.
su -s /bin/sh -c "/var/lib/magnum/env/bin/pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata osprofiler" magnum

Docker: transaction check error

I am trying to install docker and following https://get.docker.com/
I am on CentOS7
-bash-4.2$ cd
-bash-4.2$ wget -qO- https://get.docker.com/ | sh
+ sudo -E sh -c 'sleep 3; yum -y -q install docker-engine'
Transaction check error:
file /usr/lib/systemd/system/blk-availability.service from install of device-mapper-7:1.02.107-5.el7_2.5.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/sbin/blkdeactivate from install of device-mapper-7:1.02.107-5.el7_2.5.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/share/man/man8/blkdeactivate.8.gz from install of device-mapper-7:1.02.107-5.el7_2.5.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
Error Summary
-------------
Anyone know what this error means and how to resolve it?
Looks like device-mapper-7 is incompatible with lvm2-7 on your system.
You could try deinstalling device-mapper-7. Then try to run the Docker installation one more time.
I've updated with:
sudo yum update
Now docker command works now

Resources