gpt4 book ai didi

docker - 无法使用 Docker : "could not determine the current user" 创建新的 Rust 项目

转载 作者:行者123 更新时间:2023-11-29 08:11:19 24 4
gpt4 key购买 nike

Docker documentation for Rust 之后, 我无法使用 cargo new 创建一个新项目而不获取 无法确定当前用户,请设置 $USER。这是我正在使用的命令:

docker run -it --rm -v "$PWD":/app -w /app rust:1.27.0-slim-stretch cargo new project --bin

最佳答案

从我的机器转发 $USER 环境变量似乎可以解决问题:

docker run -it --rm -e USER=$USER -v "$PWD":/app -w /app rust:1.27.0-slim-stretch cargo new project --bin

关于docker - 无法使用 Docker : "could not determine the current user" 创建新的 Rust 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51137904/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com