How can I get a tomcat docker image based on rhel7? - docker

The one listed on https://hub.docker.com/_/tomcat is based on debian. Where can I get a rhel based image? Or is there a way I can create it by myself.
I am currently working on rhel 7.6 and have docker installed on my machine?

You have to build it yourself because RHEL is proprietary and therefore underrepresented in docker hub. You could go for a centos version though, which is almost identical.
Note: RHEL would be considered an extremely unusual choice for a container OS. Are you sure you're doing the right thing? If this is a rule given to you by your employer then it's wrong and you should go fix that instead -- it'll be easier than trying to build rhel containers.
You could take a look at this as a starting point for ideas on how to build it yourself: https://github.com/sclorg/rhscl-dockerfiles/blob/master/centos7.python27/Dockerfile.rhel7

Related

Is Docker-ized dev envoirment good for maintaining legacy software?

Let's say I have old, unmaintained application that lives on a VPS (i.e. Symfony 3 PHP app that relies on PHP 5).
If some changes are needed I have to clone this app to my desktop, build it, change and re-deploy. As time goes, recreating desktop dev environment gets harder - in this example I can't simply build the app as I use PHP7 in my CLI that breaks building process.
I tried to dockerize the app, so I added Ubuntu 18 to my docker-compose file... and it doesn't work as latest Ubuntu that has PHP5 support is 14.04. 14.04 is also the oldest (official) version available on DockerHub. But will it be still available in 3 years? If not, Docker won't build a container.
So, my question is: is Docker a right tool to solve described problem at all?
If so, should I backup docker images described that my build relies on?
If not, beside proper maintenance, what tool is better?
You can install PHP5 in newer ubuntu versions, but it means adding an external repository.
You could also create your own docker image, containing only the libraries you want. If so, I'd advise to try and use alpine as a base image. There is a bit of a learning curve to adapt, but once you do it you'll have a small image tailored to your needs.
Given that containers allow you to isolate processus and conf with minimal footprint compared to a VM, I think it is the best option. Tailoring and maintaining your own image is not that expensive in terms of maintenance if you document it correctly, and it will allow you to always have a system 'maintaining' all your precise requirements.

Which is the best OS for ForgeRock products (i.e. AM, IDM, DS and IG) to be used in Docker container?

Currently Forgerock is providing different OS for different products for docker container (below list):
AM(v6.5.2) available on Debian-9
IDM(v6.5.0) is available on CentOS 7.7.1908
DS(v6.5.2) is available on Ubuntu 18.04.2
IG(v6.5.1) is available On Alpine 3.9.4
We want to use single flavor of OS for these deployments on ForgeRock products.
So my Question is- Which OS I should go for preparing the Docker image?
Probably the best is Centos/Red Hat since there is more documentation of deployments on this environment.
To be honest, in terms of the ForgeRock stack (apart from the WebAgents) - it doesn't really matter because they all run within a JVM. What JDK you choose will have more bearing, but in terms of distribution, it's up to you and whatever you feel aligns with your deployment best.

Is there a CentOS equivalent of the official ruby:2.2.0 docker image?

I have just built a containerized ruby on rails application. The application was originally running on CentOS servers, but my containerized version runs inside the ruby:2.2.0 docker image which is Debian based.
For the sake of simplicity it would be slightly better if I could have it run in a Redhat or CentOS based version of this docker image instead. So is there an exact Redhat or CentOS based equivalent of the official ruby:2.2.0 docker image?
Note: I don't have any real need at the moment to run this inside of Redhat instead of Debian, so if the image I'm looking for doesn't exist then, to me, its not worth the time and effort of building one from scratch.
Thanks #ryekayo, after some editing of https://github.com/volanja/docker-ruby2.2.0/blob/master/Dockerfile I got a working version.

Cannot start container: [8] System error: exec format error

I'm brand new to Stack Overflow and the world of containers, so hopefully my questions aren't too silly.
So first I will say that I'm aware that there are other questions similar to the one I'm asking, but I've tried the solutions in all of the ones I've found and they haven't worked for me. If there is another question out there that does have the answer, I'm really sorry for double-asking!
So, background info: I've got a Raspberry Pi 3 running Raspbian, with docker freshly installed. I'm able to pull images down from repositories with no real issues. However, I can't run any of them. I always get the same error (the title of my question). Someone pointed out that it might be because there are mostly 64-bit images in the repositories and I'm running a 32-bit machine, which I thought was the problem. but then I pulled a 32-bit Debian image (the first thing I could find that was 32-bit) and tried to do docker run with the image ID. but it still comes up with that error.
What else may cause that error? Or maybe it's the fact that I'm doing it on a Pi...? Open to anything!
Thanks in advance!
I have had similar issues when I tried to run Docker images on Rasperri Pi. Most of the Docker images are built for x86/x64 architecture. You need Docker-based apps packaged specifically for ARM to run on Raspberry Pi. Hypriot (Based on Debian) is one of the Raspberry Pi images that built for running latest Docker. Check it out here. They also have images specifically built for ARM. Search for hypriot on docker hub.You still may run these images with your current Docker installation, which I did not try.

Current LXC support for Red Hat - How do I create a RHEL 6.x LXC container?

I have been working with LXC containers, the basic tutorials and some networking and it seems to me that its a very straightforward and simple way to create a pure distribution on top of my host.
Current list of templates available does not however list the RHEL x.x distribution. There is CentOS.
I see that Red Hat has supported some efforts in LXC with the libvirt driver, however that shows as deprecated on the site and everything is pointing to their Atomic host which I am experimenting anyways, however, that seems more of a docker way. There might be some variations of docker which ultimately may give me a bare minimum container running a full distro.
I am OK getting more into docker but what I expect at this moment is to run as a simple LXC container with RHEL 6.x distro. Is there no way to run a RHEL LXC container ?
it is indeed unfortunate that redhat plans to discontinue libvirt support for lxc. even within rhel7, so that means rhel6 may be the last version where it will be supported for the lifetime of that release.
as an alternative, there are packages for lxc in epel: https://dl.fedoraproject.org/pub/epel/6/x86_64/repoview/lxc.html
they are even easier to use than libvirt-lxc
as for the template, in either case you should be able to use the centos template with little modification. all the packages are the same and really only the repo sources should point to redhat instead of centos.

Resources