A library to build executable Docker images based on a source file and a list of input directories.
- Build with
./gradlew shadowJar
- Run
java -jar build/libs/packer-1.0-SNAPSHOT-all.jar --base-image sandworm/base/c_cpp --source-directory src/main/resources/c_sample --image-prefix sandworm/images/test_image
- Run the compiled Docker images with
docker run --rm -it sandworm/images/test_image/compiled/hello_petar
anddocker run --rm -it sandworm/images/test_image/compiled/hello_world
Right now, Packer expects a directory containing the source and the input files in the following structure:
source/
main.c
some_other_source_file.c
inputs/
input description/
stdin
some_other_file
See the project sandworm-images for a list of available base images.