-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented custom images #44
Conversation
@@ -220,6 +220,10 @@ impl From<Host> for Target { | |||
} | |||
} | |||
|
|||
pub type Tag = Option<String>; | |||
|
|||
pub struct DockerImage(Option<String>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should probably just make this into a newtype like I did with Tag
.
Thanks for the PR, @Emilgardis. I rather not extend the CLI; I want to keep it exactly the same as Cargo. Could you move the image overrides into a Cross.toml file that sits next to Cargo.toml? That file would apply to all the I'm thinking of something like this: # Cross.toml
[target.armv7-unknown-linux-gnueabihf]
image = "user/repo:tag" # or "user/repo" (implies :latest) or just "repo" (doesn't look up the image in DockerHub) |
Fair enough. I have however a question about your example here.
Does that mean cross should parse |
Just passing the |
Ok, I'll remove the check on local images aswell, I feel like it is uneeded with this change. |
5c652ab
to
26970a2
Compare
Use a Cross.toml file located at manifest dir. * `target.{target_tripe}.image` to set image used by docker * `target.{target_triple}.tag` cannot be used with image (ignored) but will set the tag for image `japaric/{target_triple}` Closes cross-rs#42
I've implemented the images now using a Cross.toml file. |
--docker-tag
and --docker-image
, also make cross smarter
Thanks for updating the PR, @Emilgardis. I'd rather not expose an easy way to use a different tag of the If you remove target.$target.tag, I'll r+. |
Thanks again, @Emilgardis! @homunkulus r+ |
📌 Commit a32f4f0 has been approved by |
Implemented custom images See issue #42 ~~These changes follow option 1 on the issue and has~~ ~~support for expansion as such: `--docker-image {target}`.~~ **EDIT::** Reworked to work with Cross.toml instead
☀️ Test successful - status-travis |
See issue #42
These changes follow option 1 on the issue and hassupport for expansion as such:--docker-image {target}
.EDIT:: Reworked to work with Cross.toml instead