package
package copied to clipboard
Add the ability to include files into the Docker image
Right now the packaging just packages code. We should extend the annotations to include arbitrary files via a FileSet
annotation or somesuch.
I'd be interested in giving this a go, starting with a Java implentation then porting to the other languages
My initial design would be to add a new tag called something like @PackageFile
and a parameter on the package tag that takes an array of them giving something like
public class Main {
@Package(repository="brendanburns",
jarFile="path/to/my-fat-jar.jar"),
additionalFiles={
@PackageFile(path="/opt/hello/message", src="files/messages"),
@PackageFile(path="/etc/hello.conf", src="files/default.conf")
})
public static void main(String[] args) {
Containerize(() -> {
System.out.println("Hello Metaparticle/Package");
});
}
}
@willpenington That design looks great to me.
Thanks!
This issue is a bit stale, as long as we're all on the same page about including a additionalFiles
mechanism I'll give this a shot with python and we can discuss further on the PR?