Sign inSign up

gerritk/ytt

By gerritk

•Updated 8 days ago

A dockerized version of vmware-tanzu/carvel-ytt (this is an unofficial user contribution)

Image
2

1M+

gerritk/ytt repository overview

⁠ytt-docker

A dockerfile for vmware-tanzu/carvel-ytt⁠

⁠

⁠Usage

⁠Templating

Simply run the container and mount your files to /workspace, e.g.:

docker run --rm -v ${PWD}:/workspace gerritk/ytt -f .
⁠Website docs

ytt originally comes with a built-in webserver that hosts the tools documentation. To be able to use it in docker however you have to pass some command line flags:

docker run --rm -p 8080:8080 gerritk/ytt website --listen-addr=0.0.0.0:8080 --redirect-to-https=false
⁠Using an alias / function

It might be convenient to create an alias or function for the commands above. Here are a couple of examples:

  1. An alias for the base templating tool:
alias ytt='docker run --rm -v ${PWD}:/workspace gerritk/ytt'
  1. An alias for the website command:
alias ytt-website='docker run --rm -p 8080:8080 gerritk/ytt website --listen-addr=0.0.0.0:8080 --redirect-to-https=false'
  1. A function combining both:
ytt () {
    if [ "$#" = "1" ] && [ "$1" = "website" ]; then
        docker run --rm -p 8080:8080 gerritk/ytt website --listen-addr=0.0.0.0:8080 --redirect-to-https=false
    else
        docker run --rm -v "${PWD}":/workspace gerritk/ytt "$@"
    fi
}

⁠Feedback

If you have suggestions on the structure of the Dockerfile or are looking for a specific version that is not available yet, feel free to create an issue.

Tag summary

Content type

Image

Digest

sha256:bfa0f00e2…

Size

11.2 MB

Last updated

8 days ago

docker pull gerritk/ytt