docker for win10

如何以root用户登录docker镜像

  1. docker ps

CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS              PORTS                               NAMES
d133665ffb5d        springcloud/eureka         "java -jar /app.jar"     47 minutes ago      Up 47 minutes       0.0.0.0:8761->8761/tcp              flamboyant_northcutt
43e8a5c9ff53        openzipkin/zipkin          "/busybox/sh run.sh"     2 hours ago         Up 2 hours          9410/tcp, 0.0.0.0:9411->9411/tcp    sharp_jones
eae8327c5cfa        genschsa/mysql-employees   "docker-entrypoint.s…"   12 days ago         Up 2 hours          0.0.0.0:3306->3306/tcp, 33060/tcp   mysql-employees

得到container id

  1. docker exec -ti -u root 43e8a5c9ff53 /bin/sh