Skip to content

Simple Docker image to build jsonnet configurations with go-jsonnet

License

Notifications You must be signed in to change notification settings

syseleven/docker-jsonnet-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Simple dockerfile to install jsonnet-bundler and go-jsonnet into a runnable container.

Usage

You need to mount the jsonnet files to /src in the container. Existing jsonnetfile.json dependencies will be installed and the jsonnet compiled. You can pass extra arguments to jsonnet:

docker run --rm -it -v $(pwd):/src syseleven/jsonnet-builder ${ARGS}

If the jsonnetfile.json file is not directly located in the mounted folder you can change the basedir with the BASEDIR argument. All entrypoint commands (jb and jsonnet) will be relative to /src/${BASEDIR} (or ${BASEDIR} if specified as absolute path).

Example

Assuming you have the following structure

$ find .
one/
one/jsonnetfile.json
one/one.jsonnet
two/
two/two.jsonnet

If one.jsonnet imports ../two/two.jsonnet and you want to pass the -S flag to the build, you can use the command

docker run --rm -it -v $(pwd):/src -e BASEDIR=one/ syseleven/jsonnet-builder -S one.jsonnet

About

Simple Docker image to build jsonnet configurations with go-jsonnet

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •