package icon indicating copy to clipboard operation
package copied to clipboard

Add the ability to include files into the Docker image

Open brendandburns opened this issue 7 years ago • 3 comments

Right now the packaging just packages code. We should extend the annotations to include arbitrary files via a FileSet annotation or somesuch.

brendandburns avatar Dec 05 '17 16:12 brendandburns

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 avatar Dec 17 '17 14:12 willpenington

@willpenington That design looks great to me.

Thanks!

brendandburns avatar Dec 21 '17 19:12 brendandburns

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?

wagoodman avatar Apr 21 '18 12:04 wagoodman