Docker File Alternatives to Latest? - docker

I was told it's better not to use latest in Docker File, but how can I find alternatives?
According to: https://ubuntu.com/download/desktop the latest version of ubuntu is Ubuntu 22.04.1 LTS but when I go to: https://hub.docker.com/_/ubuntu/tags I see strange tags like: bionic what is that?
and 22.10 this is a future version? how is that possible?
and while I could fine 22.04 I could not find 22.04.1

There are many problems involving the usage of latest tag on a docker image. The application is constantly changing and with it its architecture as well. While pulling an image with the latest tag, you use these changes as well. This may be good in a personal project sometimes but in a large scale application, you dont want your application to change drastically. Example:
While working on a dockerized application, we incorporated db connector to session storage redis db, the connector connected to redis at the start of the application and if it was unsuccessful, the application would not start. Every update/change on the host machine with running application meant deploying redis as well as we were using the latest tag.
22.04 Ubuntu is the latest LTS build, but there also is experimental 22.10 (ref. Ubuntu 22.10

Related

Cannot pull the project from Bitbucket (the project is with IP restrictions) while using Docker with WSL2 Ubuntu-20.04 Distro

I've a Symfony project that I am running on my PC with Symfony serve.
This project is on Bitbucket that has IP restrictions, I can only work from home and nowhere else for security reasons, and all works just fine :).
I wanted to create a Docker image so that I can easily change my machine and be able to deploy it elsewhere.
So I created a Docker image and did the necesseray configurations and all seems good, I can open the project and work the same way as before. The Docker has the default WSL (WSL1) and I've noticed that the application isn't running as fast as usual (outside the Docker, to load a page it would take 3 seconds, while with Docker it takes at least 30 seconds).
I did some research and found out that I could use the WSL2 with DOCKER which provides better performance than the legacy Hyper-V Backend and Enabled integration for the distro UBUNTU-20.4. The problem using the WSL2 is that I am no longer able to pull my project in the WSL2 (from the Ubuntu-20.0) because of the IP restrictions.
It is really strange that I cannot find any configuration for this and I have no idea what should I do to change it. If I pull the project outside the WLS2 distro it works, with the default WSL it works also but not with the WSL2.
I removed the IP restrcitions and the Docker image worked fine, I have the same speed as If I was outside the Docker. The only problem is that I cannot use the IP restrcitoins for this !
Does anyone know how to fix this ? I haven't been able to find any documentation for this issue.
I am using Windows 10 and the Docker version : 4.5.1 (74721)
Thanks a lot for any information.

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

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

Which source/tag should be used to download Odoo 12 community for Synology/Docker

Good Day:
I have been trying to create an Odoo 12 community version container on Docker in Synology DSM. Which source/tag should I use for this purpose?
The following source is the one I have been working with directly from Synology Docker:
https://hub.docker.com/_/odoo/
(Tag: Latest)
The only thing I have been able to do is creating a container for Odoo 12 enterprise, but not for Odoo 12 community.
Please advise.
Regards,
The official Odoo docker version is currently from date 2018-10-08 and it had a bug that showed incorrectly Enterprise version in Settings page also in Community version. So the good news is that you are in fact already running Community version. The bug was fixed in this commit.
The more complicated question is what version of docker image should you run. The official Odoo docker image (library/odoo or _/odoo or just odoo) does not get updated very frequently. It is not updated to fix issues. I would not recommend it for any other use than testing.
You can use other images that are updated more frequently and have static tags, e.g. I maintain an image with nightly Odoo builds. It is named veivaa/odoo. You can use a specific version of Odoo nightly build with tag version-date, e.g. veivaa/odoo:12.0-20181106. The nightly image can be found in Docker store at https://store.docker.com/community/images/veivaa/odoo. This version is updated on ”best effort” bases.
You find more information on running Odoo in Docker in my blog.
It is also not best practice with Docker to use the latest tag in production use or if you need to be able to keep the container stable. This is because you would get a different version depending on when you pull the image. Best practice is to either use a stable nonchanging tag, or build your own Dockerfile and image in own container registry.

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.

how to find docker 1.3.1 rpm at epel

I want to install docker 1.3.1 on my centos 6.5 environment but I have no idea how to find it in the epel. I'm quite new to docker. Can anyone help me out? Thanks
Clearly stated in the Docker documentation:
Docker runs on CentOS 7.X.
CentOS 6.5 is not CentOS 7.X. Docker is not available for your old operating system.
Furthermore, you didn't give any details about your computer, but you should remain aware that Docker only works on 64-bit systems.
By the way, you should take better care of your computer; in CentOS, the minor version number is updated automatically by the package manager. So the fact that you are two versions behind (CentOS 6 is currently on 6.7) indicates that you are not performing updates to your packages, and could have various security vulnerabilities. You should update your system regularly, by simply running yum update.

Resources