-
Notifications
You must be signed in to change notification settings - Fork 21
Automatically build and publish container images to Github Container Repo #23
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
base: master
Are you sure you want to change the base?
Conversation
| RUN go mod tidy | ||
| RUN go build . | ||
|
|
||
| FROM docker.io/debian:stable-slim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>" | |
| LABEL org.opencontainers.image.source="https://github.com/patrickbr/gtfstidy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go.mod and go.sum are missing.
This will allow to remove the go mod commands below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?