Usually, I run docker by the following command:

docker run -it <docker image name>

When I try to debug inside docker, I find that breakpoint does not work at all and there is warning about ASLR.

After I google this problem, a solution from stack overflow comes.

In one word, this solution need you to run docker image in privileged mode.

docker run --privileged -it <docker image name>