gotemplate is a powerful templating language, and this tool allows you to use it easily in Docker
1.1K
gotemplate is a powerful templating language, and this tool allows you to use it easily on the command line
Report Bugโ
ยท
Request Featureโ
This repository hosts the Dockerized build setup for gotemplate, a versatile templating tool. Our aim is to provide an automated build process that supports multiple architectures, ensuring easy and efficient deployment of gotemplate across various systems.
Multi-Architecture Support: Our Docker images are built to support multiple architectures, including ARM64 and AMD64, making them suitable for a wide range of hardware platforms.
Automated Builds: The build process is fully automated, leveraging the latest versions of gotemplate. This ensures that you always have access to the most recent features and bug fixes.
Dockerized for Convenience: By containerizing gotemplate, we encapsulate its dependencies and environment, ensuring a consistent and isolated execution environment that is easy to set up and use.
gotemplate Directly in DockerYou can run the gotemplate templating engine directly in a Docker container. This method is straightforward and doesn't require you to install gotemplate on your host system. Here's how you can do it:
gotemplate image from the Docker repository.docker pull rorylshanks/gotemplate:latest
gotemplate in a Docker container. For instance, if you have a template file on your host system that you want to process with gotemplate, you can mount the file into the container and run the templating engine on it.docker run --rm -v $(pwd):/data rorylshanks/gotemplate:latest gotemplate /data/your-template-file
Replace your-template-file with the path to your template file.
gotemplate in Docker Builds with COPY --fromAlternatively, you can use gotemplate in your Docker build process. This is particularly useful when you need to template configuration files or other resources as part of building a Docker image. Here's how to do it:
COPY --from to copy the gotemplate binary from the Docker image into your own image.# Use a multi-stage build
# First stage: get the gotemplate binary
FROM rorylshanks/gotemplate:latest as gotemplate
# Second stage: build your own image
FROM your-base-image
# Copy the gotemplate binary from the first stage
COPY --from=gotemplate /gotemplate /usr/local/bin/gotemplate
# Rest of your Dockerfile...
By using gotemplate in these ways, you can benefit from the flexibility and power of templating directly in Docker environments, either interactively or as part of a Docker build process, without needing to manage the installation and dependencies of gotemplate on your own systems.
We welcome contributions to this project! If you have suggestions or improvements, please feel free to submit a pull request or open an issue.
This project is open-sourced under MIT Licenseโ .
This project is based on gotemplate by Coveo. Visit their GitHub repository for more information about the tool: coveooss/gotemplateโ .
Content type
Image
Digest
sha256:81eb36fb0โฆ
Size
11.4 MB
Last updated
almost 3 years ago
docker pull rorylshanks/gotemplate