jackc / tern

The SQL Fan's Migrator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Docker image

muhlemmer opened this issue · comments

For my projects I'm usually building a Docker image with the migration scripts included. Now I'm building images from scratch in various projects, but in order to safe some CI minutes I'm looking to build a single "tern" base image for all of my projects.

If you are interested in a Docker image for this repository, I can commit a Dockerfile here and (help) setup a CI environment. This can be either Github actions, or directly building it on Docker hub.

I can see how that could be useful. Unfortunately, I have only minimal experience with Docker and that was several years ago. I'm very reluctant to merge a feature that I am unable to easily understand and maintain.

commented

hi, we needed this since we want to use tern to apply migrations in our k8s init containers.

we did it here https://gitlab.com/gfx-devops/tern
you can pull it here registry.gitlab.com/gfx-devops/tern:v2.1.1

you can use it with docker run as well, ala docker run -v .:/root registry.gitlab.com/gfx-devops/tern:v2.1.1 print-connstring

it is a simple image that pulls the release from the github release.

i'll be manually creating new tags for now, probably will set up something automated in the future.

@muhlemmer let me know if you would like me to create base images on something that isn't x86 alpine (it is trival). otherwise you can just use the image as a layer and copy /usr/local/bin/tern

@jackc, GoReleaser has Docker Images to build docker image. Do you accept PR?

@robsonpeixoto I don't have anything against it. But as I mentioned above, I work with Docker very infrequently, so I couldn't really maintain it. But if it's just some GoReleaser config then sure.