[Personal memo] Looking back on what I got stuck in Docker ... including knowledge of Linux

Purpose

I've been denied docker push, so I look back on trying to get around it.

Conclusion

When I changed the image name with docker tag, I was able to docker push.

Even if I tried docker push or changed the image name with docker tag, it was the same phenomenon. When I checked with "docker ps -a", there were several cases where the COMMAND column was "python3". I wondered if this was the reason why I couldn't docker push. In "docker ps -a", the process name of the docker container is displayed in the COMMAND column. I understand by referring to here. It was. I thought that it might be possible to change from python3 by killing the process referring to the following article. [Summary of how to use the kill command to end the processLinux ... [Ps / kill] Displaying running processes and forcibly terminating --Qiita When I connected to the dokcer shell, I found that python3 was PID1 when I typed the command "ps -a". The process could not be killed for PID1 even with pkill1. When running node.js with Docker, don't set it to PID 1 ... Avoid PID 1 issue with Docker / Kubernetes | text ... By referring to the above article, I found out that it was a PID 1 problem, and I was able to start python3 with a command other than PID 28 or PID 1 with the "docker run --rm -d --init" command. I was able to terminate the python3 process by typing a command like "pkill 28 (PID)". Here, I checked the COMMAND column with the command "docker ps -a", but the notation of "python3" did not disappear. [Note] docker push rejected --Qiita Based on the above article, I created an image with ansible-base installed using the "docker commit" command. Push and share container images to Docker Hub ... With reference to the above article, I was able to create an image named "username / ansible-base" with the "docker tag" command and "docker push".

Recommended Posts

[Personal memo] Looking back on what I got stuck in Docker ... including knowledge of Linux
I got stuck in a clone of a two-dimensional array
I got stuck in File
Looking back on the basics of Java
What I got into @Transactional in Spring
Where I got stuck in today's "rails tutorial" (2020/10/05)
Where I got stuck in today's "rails tutorial" (2020/10/06)
Where I got stuck in today's "rails tutorial" (2020/10/04)
Summary of what I learned in Spring Batch
Where I got stuck in today's "rails tutorial" (2020/10/07)