-
Notifications
You must be signed in to change notification settings - Fork 481
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
Change ADD in dockerfile syntax to support renaming output file #2571
Comments
I think you can already do that:
Are you getting some error when attempting to do that with your URL? |
Yes, it's supported indeed, but I think the documentation could use a touch-up to be more clear on that. It's there if you somewhat read between the lines, but it's not very clear; https://docs.docker.com/reference/dockerfile/#add
The above describes that if it DOES end with a trailing There is a mention of the same situation but when using a local source (not a URL);
So we should either combine those, or perhaps repeat that last information for the "URL" section. As it all becomes a bit, complicated, I'm wondering if that section should be split into three (or more) sections. That would possibly come at the cost of repeating some of the information but (maybe? would have to try) could make it clearer to understand, and may make it clear what kind of sources
|
Let me transfer this to the buildx repository (where most of the build-related docs are now maintained), although the Dockerfile reference is maintained in the Buildkit repository (but can't transfer it there because it's a different org). Also /cc @dvdksn (for docs) |
Description
Say you got an existing line like
RUN wget -nv -O /usr/local/bin/nrfutil https://developer.nordicsemi.com/.pc-tools/nrfutil/x64-linux/nrfutil-v2.2
It would be nice to be able to rewrite it as
ADD https://developer.nordicsemi.com/.pc-tools/nrfutil/x64-linux/nrfutil-v2.2 /usr/local/bin/nrfutil
Where nrfutil-v2.2 is renamed to nrfutil
Right now, if I understand correctly you can only really do
ADD https://developer.nordicsemi.com/.pc-tools/nrfutil/x64-linux/nrfutil-v2.2 /usr/local/bin/
as the definition of ADD only supports adding file to a folder path. Which would force you to addRUN mv nrfutil-v2.2 /usr/local/bin/nrfutil
which is quite ugly.The text was updated successfully, but these errors were encountered: