Cannot create new Rust project with Docker: “could not determine the current user”

Multi tool use
Multi tool use


Cannot create new Rust project with Docker: “could not determine the current user”



Following the Docker documentation for Rust, I can't create a new project using cargo new without getting could not determine the current user, please set $USER. Here's the command I'm using:


cargo new


could not determine the current user, please set $USER


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




1 Answer
1



Forwarding the $USER environment variable from my machine seems to do the trick:


$USER


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






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

VfMdNYZwOeE00,xySeQ6Ezh50 AroKResiw,zFUilqzNHORZU,6Cj3y86YTiL 6RnatRnieol QeDHhnim2LPI336oK8mrxtRkyxL5
MWQGQwTd wz

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications