Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

docker-run.sh uses $HOME/.cargo for CARGO_HOME #4099

Closed
rob-solana opened this issue May 1, 2019 · 3 comments
Closed

docker-run.sh uses $HOME/.cargo for CARGO_HOME #4099

rob-solana opened this issue May 1, 2019 · 3 comments
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Milestone

Comments

@rob-solana
Copy link
Contributor

Problem

Using CARGO_HOME set to HOME/.cargo for crates we want to build and run in CI isn't going to work nicely... Normally when doing that, we'd add CARGO_HOME/bin to the PATH. However, were we do that, we're likely to negate the value of using a docker image, which has pre-installed, specific versions of cargo, rust, etc.

Proposed Solution

The fix (to enable installing and running any random --bin crate during a build) has two parts:

  1. have docker-run.sh not use $HOME/.cargo as CARGO_HOME, have it use the workspace or something else with predictable, controlled contents.
  2. update our rust Dockerfiles to put $CARGO_HOME/bin on the PATH via an ENV directive (because using --env from docker-run.sh can't do it correctly)
@rob-solana
Copy link
Contributor Author

actually, it turns out that Dockerfile can't do this right, either:

ENV PATH ${CARGO_HOME}/bin:${PATH}

doesn't make a dynamic PATH variable, it binds the value during docker build...

moving on to something in the workspace instead

@stale
Copy link

stale bot commented Sep 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Sep 16, 2020
@stale
Copy link

stale bot commented Sep 24, 2020

This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Sep 24, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants