docker cp命令出错问题

docker cp 4e6:/etc/nginx/nginx.conf /home/nginx/conf

使用docker在复制官方nginx容器的conf文件时,发生了错误。

Error response from daemon: error processing tar file: docker-tar: relocation error: /lib/x86_64-linux-gnu/libnss_files.so.2: symbol __libc_readline_unlocked, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
: exit status 127

解决方案

Initialize nss libraries in Glibc so that the dynamic libraries are loaded in the host environment not in the chroot from untrusted files.

CVE-2019-14271 may allow unprivileged access to host system while copying files from a malicious container image with docker cp command.

Affected versions: v19.03.0. Older Docker versions are not affected by this issue.

This fix is included in the already released Docker v19.03.1. Users of Docker v19.03.0 are advised to upgrade.


通俗的讲就是升级docker版本!

原文地址:https://www.cnblogs.com/cnlihao/p/11255000.html