How to install openshift in RHEL 7.6 docker? - docker

I downloaded a rhel 7.6 image from the Red Hat Container Catalog.
I followed this steps https://docs.openshift.com/container-platform/3.5/install_config/install/host_preparation.html
But when I tried this command yum install atomic-openshift-utils, it failed with this error:
No package atomic-openshift-utils available.
I need to install Open Shift Enterprise. How to do it in the docker ?

To install something with yum in a RH image you'll need the container running on a rhel with valid subscription data and the correct repositories configured.
To test openshift enterprise would be better to use rhel vms instead a docker image.
Regards.

Related

How to run zypper commands in SUSE container on non-SUSE host OS (if even possible?)

I'm trying to create support for my program on the SUSE OS...by creating a docker container with my base image/layer being SUSE and then installing my program and any dependent packages via zypper.
I'm on windows but I've Switched to Linux Containers. When I run my container the container's OS is SUSE but the problem is with zypper...the commands fail to install, update, etc
Here's my docker file which I'm using the build the image for the container:
FROM registry.suse.com/suse/sle15
In the container this creates I do:
zypper update -y
which gives this error:
Problem retrieving the repository index file for service 'container-suseconnect-zypp':
[container-suseconnect-zypp|file:/usr/lib/zypp/plugins/services/container-suseconnect-zypp]
Warning: Skipping service 'container-suseconnect-zypp' because of the above error.
Loading repository data...
Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed.
Reading installed packages...
Nothing to do.
Doing zypper install libcurl also gives a similar error and doesn't install anything.
My question: is it possible to use zypper if my host OS isn't SUSE? I've found examples of referencing repositories with zypper if the host OS is SUSE but I'm not sure how to do so if the host OS isn't SUSE
Note: I plan to put the zypper commands in the docker file, I'm just running it in the container now to more clearly see what's happening.

containerd.io vs docker-ce-cli vs docker-ce: what are the differences and what does each package do?

I am trying to install docker on my laptop and I find that there are three packages from the repo:
containerd.io
docker-ce-cli
docker-ce
Can anyone explain to me in simple words what the differences are among these packages, what each one of them does, and what part of the docker architecture each corresponds to? Also, can they work independently on each other?
containerd.io : daemon containerd. It works independently on the docker packages, and it is required by the docker packages.
containerd is available as a daemon for Linux and Windows. It manages the complete container lifecycle of its host system, from image transfer and storage to container execution and supervision to low-level storage to network attachments and beyond.
docker-ce-cli : command line interface for docker engine, community edition
docker-ce : docker engine, community edition. Requires docker-ce-cli.

Boot2docker with jenkins

I want to install jenkins on Boot2docker but I could not solve it.My aim is to use continous integration with my spring boot project.On Centos,I can install jenkins but with boot3docker how can I install jenkins.I made some researches, maybe I have to pull jenkins image after that I have to run the image on docker container.Is it a good idea to run jenkins from container?I saw a video,the instructor install jenkins on Centos without using container.

Creating container image of old Centos

I need to create Centos 6.9 32bit system image. I found manual how to do that which contains link to script.
I suppose for this reason I need to run Centos 6.9 32bit, install docker in it and then run script.
Trying to install docker in Centos 6.9 and. Found that it is not possible to install on this system according to requarements in manual:
OS requirements
To install Docker CE, you need a maintained version of CentOS 7
How to create container for of old Centos 6.9 ?
There is already an official CentOS 6 32-bit image in Docker Hub, so you might not need to create your own. It can run on an x64 host.
There is no centos:6.9 tag but a quick test of the centos:6 tag shows that it is 6.9 anyway:
$ docker pull i386/centos:6
6: Pulling from i386/centos
6fe27d5f397b: Pull complete
Digest: sha256:af47b24bee01b29f3c86e484b716651f89c93d8ca73d88c1a74019c691e0d1e2
Status: Downloaded newer image for i386/centos:6
$ docker run -it i386/centos:6 bash
[root#508467e5637e /]# cat /etc/redhat-release
CentOS release 6.9 (Final)
Update
I see from your previous question that you had already found the official 32-bit CentOS 6 image but want it to run on a 32-bit host kernel.
According to the docker installation prerequisites, it needs a 64-bit host. Docker does have 32-bit packages but they only contain the docker client and not the daemon.
If you want to run a 32-bit version of the docker-daemon, you could try following this blog post which describes how to build it from source.

FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8/1.4.1
OS/Arch (client): linux/amd64
FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
please lte me know y it is giving this error .i m using rhel 6.4
As comments suggested probably Docker daemon is not running. AFAIK, docker is not supported for RHEL 6.4. Check Docker documentation:
Red Hat Enterprise Linux 6.5 Installation
You will need 64 bit RHEL 6.5 or later, with a RHEL 6 kernel version
2.6.32-431 or higher as this has specific kernel fixes to allow Docker to work.
Docker is available for RHEL6.5 on EPEL. Please note that this package
is part of Extra Packages for Enterprise Linux (EPEL), a community
effort to create and maintain additional packages for the RHEL
distribution. Kernel support
RHEL will only support Docker via the extras channel or EPEL package
when running on kernels shipped by the distribution. There are things
like namespace changes which will cause issues if one decides to step
outside that box and run non-distro kernel packages.
Warning: Please keep your system up to date using yum update and rebooting your system. Keeping your system updated ensures critical security vulnerabilities and severe bugs (such as those found in kernel 2.6.32) are fixed.
with a fresh installation: (notice the sudo at the beginning)
$ sudo service docker start
$ sudo docker run hello-world
worked for me

Resources