Docker, Linux

Excluindo uma tag de um repositório Docker em um registro remoto

Quando voce publica uma imagem Docker em algum repositório remoto (privado ou público) não é possível excluir uma tag da imagem utilizando o cliente docker na linha de comando.

docker rmi <id da imagem>

isso removerá apenas do seu registro local.

Para remover do registro público é necessário utilizar a API REST [1] do serviço de registro do docker.

De acordo com a documentação da API Docker Registry [2] o endpoint é o seguinte:

DELETE /v1/repositories/(namespace)/(repository)/tags/(tag*)


DELETE /v1/repositories/reynholm/help-system-server/tags/latest HTTP/1.1
Accept: application/json
Content-Type: application/json
Cookie: (Cookie provided by the Registry)

Exemplo que usei no meu caso:

[root@rhel7-server-1 httpd]# curl -X DELETE


Se o retorno for ‘true‘ sua tag foi removida!

Execute novamente a requisição REST para se certificar

curl -X DELETE
{"error": "Tag not found"}

Observe o retorno:

{"error": "Tag not found"}


Containers, Dicas, Linux

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

Hello guys!


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

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.



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: will be installed
Dependencies Resolved
 Package Arch Version Repository Size
 java-1.7.0-openjdk x86_64 1: rhel-7-server-rpms 196 k
 java-1.7.0-openjdk-devel x86_64 1: 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

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:

Well, I hope this could help you.