The problem to solve in this post is that when I want to create a Cassandra ver 3.7 Image from the Oficial Docker file, the process fail and when I take a look in internet too many people are facing the same problem. So the docker file is wrong in that version an in others.
I have tested Cassandra Docker Hub repository and its true that we can build our images from his sources docker files BUT quite well just only few of them (see image below).
I gonna try with Cassandra 3.7 and the first thing that I am going to do is follow the instructions described in the Cassandra github repository about its docker file template and surprisingly we get an Error or even using the dockerfile Cassandra version 3.7 we face the same error, see image below.
So in a best case when I construct the image changing the Debian's suite I have to refactor it because the image can be can be built it BUT the cqlsh tool cannot be accessed, see image below.
You can dive into github post that explain how other Unscanned Cassandra versions are facing the same problem when you try to create image from docker file.
Any way is frustrating after to many hours trying, so finally we refactored the image for solve the problems with openjdk-8-jre-headless adding to the official image the following snapshot of code:
RUN { \ echo 'Package: openjdk-* ca-certificates-java'; \ echo 'Pin: release n=*-backports'; \ echo 'Pin-Priority: 990'; \ } > /etc/apt/preferences.d/java-backports
You can find the solution for several version of cassandra docker files images in case that you want to build images from source in Cassandra version (3.9 - 3.10) that's the code that I have indicated previously.
You can find all the source code of Cassandra's image ver 3.7 in my github repository. We have tested it but if you have any problems please send us a feedback.
For many reason we should need to build an Official image from its sources for example is we need to add a layer to the image for Liveness and Readiness Probes in case of we want orchestrate our container with Kubernetes, it is not an obligation it is just a good practice. You can face the same situation in Docker when you are defining your Docker Compose yaml file. In next posts I am going to explain how deal with it.
1 comentarios:
Publicar un comentario