-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow to add single file to a container (with setting rights) #2564
Comments
Yeah it's a limitation of our system, it only works for directories. You probably need to make sure the ssh directory only has the id_rsa file, and copy that directory over.
|
Copying the following comment from #3164, as this issue was opened far earlier and has many thumbs-ups. Yeah, unfortunately If you can't put it in <plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>copy-extras</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/jib-extras</outputDirectory>
<resources>
<resource>
<directory>target/some-files</directory>
<includes>**/*.txt,**/*.rtf</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin> Then for the Jib configuration, <extraDirectories>
<paths>
<path>
<from>target/jib-extras</from>
<into>/dest-dir</into>
</path>
</paths>
</extraDirectories> I'm not saying that adding the But probably, instead of adding the new config <extraDirectories>
<paths>
<path>
<from>../folder1/</from>
<into>/app/contexts</into>
<includes>context1.xml</includes>
</path>
</paths>
</extraDirectories> That way, we can have the same effect of copying a single file without adding |
@tomikmar @labmonkey @andritch @daanschipper @cpvandehey @Nemesys @MiellyEllen We released Jib plugins 3.0 that implemented a inclusion/exclusion feature to |
Environment:
Description of the issue:
It would be useful if it was possible to add single file to a container (with setting rights). I am currently migrating from one system to the other and for some time I need to keep things compatible between both of them. Currently it is not possible (without workaround) to move the following Dockerfile command to jib-maven-plugin (it's possible only for directories):
COPY ./ssh/id_rsa /home/myuser/.ssh/id_rsa
Steps to reproduce:
Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.4.0:build (default-cli) on project config: /home/builder/src/config/ssh/id_rsa is not a directory -> [Help 1]
The text was updated successfully, but these errors were encountered: