Containers, Dicas, Docker, Geral

Como me mantenho atualizado sobre a onda Containers, Docker e afins…

Olá!realcontainers

Neste post quero compartilhar algumas referências que venho utilizando para, não apenas aprender, mas principalmente me manter atualizado sobre o tópico Containers, Docker, Kubernetes (orquestração) e afins…

Como tudo tem um início, segue alguns links interessantes pra quem está començando no assunto. O site opensource.com é uma excelente fonte pois reúne o que há de mais relevante no mundo Open Source. Abaixo alguns artigos para conhecer Docker:

opensourceblog

 

O Site CenturyLink Labs também disponibiliza artigos exelentes escritos pelos principais especialistas no assunto.centurylink labs

Para quem está interessando em desenvolver aplicações nesse novo paradigma de Cloud e Containers sugiro seguir o Blog do Arun Gupta: http://blog.arungupta.me/

Arun Gupta weblog

Arun é um dos vários evangelistas Red Hat que escreve  sobre JavaEE, Docker, Containers, Microservices e demais soluções Red Hat JBoss Enterprise Middleware

Após conhecer esse novo mundo , sugiro assinar essas duas Newsletter

Alguns perfis que vale a pena seguir no Twitter_logo:

Para uma abordagem Corporativa do uso de Containers veja:

red hat containers

Containers, Dicas, Linux

Installing the OpenJDK 7 in a RHEL 7 Docker Image: systemd dep issue

Hello guys!

redhat-docker

Maybe you are thinking… WTF! Why have this guy written this post in English?!

Well,
I think this is my first blog post in this blog written in en_US. The motivation is simple. The subject (Docker and all the related things around it) is attracting almost all the attention of IT at this moment. So the basic idea is to help more people that might face the same issue described in this post.

So, please ignore any language/typo mistake.

😉

Ok!

For those trying to build a RHEL 7 Docker Base Image with Java 7 support (OpenJDK 7 packages), the openjdk pkgs depends on systemd. When you try to install the openjdk via yum you may see the following error:

bash-4.2# yum install java-1.7.0-openjdk.x86_64 java-1.7.0-openjdk-devel.x86_64
Resolving Dependencies
--> Running transaction check
---> Package java-1.7.0-openjdk.x86_64 1:1.7.0.71-2.5.3.1.el7_0 will be installed
...
Dependencies Resolved
==================================================================================================================================================
 Package Arch Version Repository Size
==================================================================================================================================================
Installing:
 java-1.7.0-openjdk x86_64 1:1.7.0.71-2.5.3.1.el7_0 rhel-7-server-rpms 196 k
 java-1.7.0-openjdk-devel x86_64 1:1.7.0.71-2.5.3.1.el7_0 rhel-7-server-rpms 9.1 M
Installing for dependencies:
...
systemd x86_64 208-11.el7_0.5 rhel-7-server-rpms 2.6 M
 systemd-sysv x86_64 208-11.el7_0.5 rhel-7-server-rpms 36 k
 sysvinit-tools x86_64 2.88-14.dsf.el7 rhel-7-server-rpms 63 k
...
Transaction Summary
==================================================================================================================================================
Install 2 Packages (+86 Dependent packages)
'Transaction check error:
file /usr/lib/rpm/macros.d/macros.systemd from install of systemd-208-11.el7_0.5.x86_64 conflicts with file from package fakesystemd-1-14.el7.x86_64'

The rhel7 official base image includes a fakesystemd (from @koji-override-0/7.0 repo) instead of full systemd. I’m not sure if this fafesystemd pkg is shipped with rhel 7 docker base image (I have to check to confirm). I saw some blogs posts saying it is used to avoid a number of bad implications with running full systemd on Docker Containers. I thik it come as a dependence with the openssh-server pkg I’ve installed before. This fakesystemd provides only some fake files to satisfy some other pkgs requirements that depends on systemd service:

bash-4.2# rpm -ql fakesystemd-1-14.el7.x86_64
/etc/binfmt.d
/etc/modules-load.d
/etc/sysctl.d
/etc/systemd
/etc/systemd/system
/etc/systemd/user
/etc/tmpfiles.d
/etc/udev
/etc/udev/rules.d
/usr/lib/binfmt.d
/usr/lib/modules-load.d
/usr/lib/rpm/macros.d/macros.systemd
/usr/lib/sysctl.d
/usr/lib/systemd
/usr/lib/systemd/catalog
/usr/lib/systemd/ntp-units.d
/usr/lib/systemd/system-generators
/usr/lib/systemd/system-preset
/usr/lib/systemd/system-shutdown
/usr/lib/systemd/system-sleep
/usr/lib/systemd/user-generators
/usr/lib/systemd/user-preset
/usr/lib/tmpfiles.d
/usr/share/pkgconfig
/usr/share/systemd
/var/lib/systemd
/var/lib/systemd/catalog

The workaround I’ve found for now is to remove the fakesystemd in order to be able to install the openjdk packages.

bash-4.2# yum remove fakesystemd-1-14.el7.x86_64

As I mentioned before to avoid the issues with the full systemd inside Docker containers I followed this approach: http://developerblog.redhat.com/2014/05/05/running-systemd-within-docker-container/

Well, I hope this could help you.