Sign inSign up

syseleven/jsonnet-builder

By syseleven

•Updated about 5 years ago

Simple Docker image to build jsonnet configurations with go-jsonnet

Image
0

6.9K

syseleven/jsonnet-builder repository overview

⁠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

Tag summary

Content type

Image

Digest

Size

26.8 MB

Last updated

over 5 years ago

docker pull syseleven/jsonnet-builder