-
-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker Image Creation on Release #564
Comments
I'm up for having a Docker container for templ. templ uses goreleaser for releases. There's support for building and pushing Docker containers in that. https://goreleaser.com/customization/docker/#how-it-works I'd prefer to build Docker containers from Nix though. Github has a built-in container registry, so it's straightforward to push containers. I manually execute releases at the moment, so that I can digitally sign them with a hardware security token, but could move to using Github Actions to do the release build. |
This is no fun at all. I've spent about 2 hours messing about with Github Workflows. https://github.com/a-h/templ/blob/main/.github/workflows/release.yml and https://github.com/a-h/templ/blob/main/.goreleaser.yaml Running into permissions issues pushing to Github. |
OK, all sorted.
|
Overview
I wanted to pitch the idea of creating an official Docker image published to DockerHub/GitHub Container Registry as an additional means to run templ commands via docker container and/or be able to use the image as a build step in our own docker images.
In my local development I like to use docker-compose to quickly spin up containers for each of my file watching processes (templ, tailwind, air) and have them all connected with the proper volumes. Since templ does not have an official docker image I've just been using the default Go image and installing templ on to it. This has been completely fine thus far and the Dockerfile is very minimal, but I thought it would be great to have an official one that comes with templ already installed.
The latter use case is also from a personal workflow in which I generate all templ Go code on build within a Dockerfile. This is also very simple setup, but would be able to further benefit from a pre-packaged image.
Let me know what you think.
The text was updated successfully, but these errors were encountered: