Automatically build and publish container images to Github Container Repo#23
Automatically build and publish container images to Github Container Repo#23leonardehrenfried wants to merge 7 commits intopatrickbr:masterfrom
Conversation
| RUN go mod tidy | ||
| RUN go build . | ||
|
|
||
| FROM docker.io/debian:stable-slim |
There was a problem hiding this comment.
Let's add OCI annotations, to provide helpful machine-readable infos to a variety of tools.
| FROM docker.io/debian:stable-slim | |
| FROM docker.io/debian:stable-slim | |
| LABEL org.opencontainers.image.title="oxygen-xml" | |
| LABEL org.opencontainers.image.description="A tool for checking, sanitizing and minimizing GTFS feeds." | |
| LABEL org.opencontainers.image.authors="Patrick Brosi <info@patrickbrosi.de>" | |
| LABEL org.opencontainers.image.source="https://github.com/patrickbr/gtfstidy" |
There was a problem hiding this comment.
docker/metadata-action actually already adds most (all?) of these labels from the GitHub metadata.
Can you check the pfaedle image (which uses the same process) to see if you're missing something? https://github.com/ad-freiburg/pfaedle/pkgs/container/pfaedle
There was a problem hiding this comment.
Thanks, I didn't know. Consider this thread irrelevant then.
to benefit from layer caching related: patrickbr/gtfstidy#23
|
Would it be possible to get a review for this? |
|
Hello, it's me again. Can I get a review for this PR? |
d3a7d64 to
2dc2a4c
Compare
|
I would also love to get this 😇 . Any chance to get it merged? |
|
@leonardehrenfried I forked your version to https://github.com/GeoSci-GmbH/gtfstidy-docker to use the original repo in the pipeline. It will build a new version every 3 months and patch the Until then, you can find the version at |
|
|
||
| WORKDIR src | ||
|
|
||
| COPY *.go ./ |
There was a problem hiding this comment.
go.mod and go.sum are missing.
This will allow to remove the go mod commands below.
There was a problem hiding this comment.
Thanks for the review. However I'm a little reluctant to work on this as this PR has been open for a while and I've not received any feedback from the repo owner.
|
|
||
| COPY --from=builder /go/src/gtfstidy /usr/local/bin/gtfstidy | ||
|
|
||
| ENTRYPOINT ["/usr/local/bin/gtfstidy"] |
There was a problem hiding this comment.
Move entrypoint above for a better use of layers, as the binary changes more often.
| RUN go mod tidy | ||
| RUN go build . | ||
|
|
||
| FROM docker.io/debian:stable-slim |
There was a problem hiding this comment.
A smaller base image would be better.
Ideally only the binary and tzdata.
Just like the PR over at pfaedle, this one automatically builds container images for this repo and deploys them to Github Container Repo.
You can see an example here: https://github.com/leonardehrenfried/gtfstidy/pkgs/container/gtfstidy
A complete example of how to use it would be:
Do you want me to add that to the documentation?