buildpacks / samples

Samples for Cloud Native Buildpacks
Apache License 2.0
194 stars 146 forks source link

Adds wine stack & builder to demonstrate Windows without a WCOW daemon #107

Closed micahyoung closed 3 years ago

micahyoung commented 3 years ago

This adds stacks and builders to let users, buildpack authors and lifecycle contributors have access to a Windows-like environments during build/detect phases, using only a Linux daemon. It can also help more advanced contributors to understand the differences between Linux and Windows functionality. It may also help catch and debug Windows bugs in cnb components.

The main limitations are:

More background and usage described in builders/wine/README.html.

I published a sample builder to my personal repo micahyoung/sample-builder:wine with can be used to build this branch's apps/batch-script:

pack build my-wine-app --path apps/batch-script/ --builder micahyoung/sample-builder:wine

## output
===> DETECTING
[detector] samples/batch-script 0.0.1
===> ANALYZING
===> RESTORING
===> BUILDING
[builder] --- Batch script buildpack
[builder] --- Hello Batch Script buildpack
[builder] Echo is OFF
[builder] Here are the contents of the current working directory:
[builder] Volume in drive Z has no label.
[builder] Volume Serial Number is 0000-0000
[builder] 
[builder] Directory of Z:\workspace
[builder] 
[builder]   1/1/1970  12:00 AM  <DIR>         821D73A2F186\cnb       .
[builder]   6/9/2021   2:41 PM  <DIR>         NT AUTHORITY\ANONYMOUS L6/9/2021..
[builder]  2/16/2021  12:45 PM           863  821D73A2F186\cnb       app.bat
[builder]  9/18/2020   9:44 AM           207  821D73A2F186\cnb       project.toml
[builder]        2 files                    1,070 bytes
[builder] 
[builder]      Total files listed:
[builder]        2 files                    1,070 bytes
[builder]        2 directories     33,366,945,792 bytes free
[builder] 
===> EXPORTING
[exporter] Reusing 1/1 app layer(s)
[exporter] Reusing layer 'launcher'
[exporter] Reusing layer 'config'
[exporter] Reusing layer 'process-types'
[exporter] Adding label 'io.buildpacks.lifecycle.metadata'
[exporter] Adding label 'io.buildpacks.build.metadata'
[exporter] Adding label 'io.buildpacks.project.metadata'
[exporter] Setting default process type 'web'
[exporter] *** Images (ed52103e233f):
[exporter]       my-wine-app
Successfully built image my-wine-app

From commit

Signed-off-by: Micah Young ymicah@vmware.com