Conversation
|
Nice! Are the docker secrets already available in this repo? |
| @@ -1,16 +1,23 @@ | |||
| FROM alpine | |||
| FROM golang:alpine3.13 AS builder | |||
| LABEL stage=builder | |||
There was a problem hiding this comment.
Is that label necessary?
There was a problem hiding this comment.
Well no, it is a label. I wanted to make clear that this step is only needed for building the software. But I can delete it if you want.
| @@ -1,16 +1,23 @@ | |||
| FROM alpine | |||
| FROM golang:alpine3.13 AS builder | |||
There was a problem hiding this comment.
What is the reason to pin alpine releases?
There was a problem hiding this comment.
Reproducible builds and best practice. But here also: Not really needed, so can be reverted if preferred in the original way.
| COPY docker/delete_user /usr/bin/ | ||
| COPY docker/entrypoint.sh /entrypoint.sh | ||
| COPY rest-server /usr/bin | ||
| COPY docker/. . |
There was a problem hiding this comment.
Is there a specific need to change the location where the helper scripts / entrypoint.sh are stored? I've been bitten a few times by container updates which "just" changed a few paths, but caused my derived containers to break.
There was a problem hiding this comment.
This is just my personal preference: Having all the additional stuff in the same location. But that is no "must". There also doesn't seem to be a best practice for that - so I can do it the way you want.
So what about merging #145 first and then I could rebase so that this PR only provides the github actions part?
The secrets have to exist first. Without them, this PR doesn't make much sense. That's up to you to decide. |
|
I've merged #145 instead of the Dockerfile changes here. |
What is the purpose of this change? What does it change?
This PR fixes #125 by creating docker images on every git tag and automatically push them to Dockerhub.
To make that work, the Dockerfile was changed to a multi-stage build, which makes it also easier because you don't need to have go installed when doing a docker build locally.
Please create the two secrets in Settings / Secrets
Whenever you tag a new release, the workflow is triggered and creates an image for linux/amd64 and linux/arm/v7. This image is also tagged as latest.
=> Please tell if you want additional platforms supported.
For the Dockerfile, I tried to follow best practices - I know there is a bit of a range there. I prefer to have all additional files in a separate directory, that's why I changed the existing part of the docker build.
Was the change discussed in an issue or in the forum before?
Closes #125 (as soon as there is a new tag after this PR is merged).
Checklist
changelog/unreleased/that describes the changes for our users (template here) (see above)gofmton the code in all commits (not needed)