-
Notifications
You must be signed in to change notification settings - Fork 321
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
Global enhancements #82
Conversation
DOCKERHUB_SLUG: tianon/gosu | ||
GHCR_SLUG: ghcr.io/tianon/gosu |
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.
Arbitrary Docker slug registries. Change if needed.
[![Docker Stars](https://img.shields.io/docker/stars/tianon/gosu.svg?style=flat-square&logo=docker)](https://hub.docker.com/r/tianon/gosu/) | ||
[![Docker Pulls](https://img.shields.io/docker/pulls/tianon/gosu.svg?style=flat-square&logo=docker)](https://hub.docker.com/r/tianon/gosu/) |
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.
Arbitrary Docker slug. Change if needed.
| [Docker Hub](https://hub.docker.com/r/tianon/gosu/) | `tianon/gosu` | | ||
| [GitHub Container Registry](https://github.com/users/tianon/packages/container/package/gosu) | `ghcr.io/tianon/gosu` | |
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.
Arbitrary Docker slug registries. Change if needed.
You may also need to create a dummy workflow on master to be able to enable GitHub Actions on this repo and also trigger a build for this pull request. Something like this would be enough: # .github/workflows/dummy.yml
name: dummy
on:
workflow_dispatch:
push:
pull_request:
jobs:
dummy:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2 |
Wow, this is ... big. You've obviously put a lot of work into it, and I don't want to discourage that, but it's definitely hard to review something that's so large and so fundamentally changes all the workflows of how I maintain this repository. 😬 Maybe you could choose your top three improvements so we can discuss something a little more focused? |
Hey @tianon, yeah I know that's pretty big sorry for that but I wanted a functional multi-platform Docker image to ease the integration in a Dockerfile like this: ARG GOSU_VERSION=1.13.0
FROM crazymax/gosu:${GOSU_VERSION} AS gosu
FROM alpine
COPY --from=gosu / /
RUN gosu --version
RUN gosu nobody true So that's my major request about this repo, a multi-platform scratch image with gosu bin inside :) For the rest I use bake to ease the workflow a lot: git clone https://github.com/crazy-max/gosu.git gosu
cd gosu
# validate (lint, vendors)
docker buildx bake validate
# test (test-alpine and test-debian bake targets)
docker buildx bake test
# build docker image and output to docker with gosu:local tag (default)
docker buildx bake
# build multi-platform image
docker buildx bake image-all
# create artifacts in ./dist
docker buildx bake artifact-all Everything dockerized so no shell script to call locally. Finally the GitHub Actions to avoid tempered artifacts and more transparency around releases as it seems to be built locally on your computer right? Nothing wrong with that, I have total confidence in you, especially since the artifact is signed but I think for this kind of project it's quite legit :) And one thing leading to another here is this PR ahaha Let me know what you think, and don't worry if you prefer to close this PR, That's a gift :) |
Yeah, I'm sorry but there's definitely no way I can merge a complete rewrite of my entire repository/workflow. I'm happy to discuss specific changes/improvements such as publishing images that contain the I'd definitely love to get to reproducible binaries such that it really doesn't matter where they build (although we likely won't be getting distribution builds such as https://packages.debian.org/sid/gosu and https://pkgs.alpinelinux.org/package/edge/testing/x86_64/gosu using the same build flags we do, and certainly not statically, but at least that would make the builds I publish easily verifiable). Of course, you're welcome to maintain your code as a fork (this is open source, after all 😄) but I would ask that if you do so that you don't call it "gosu" to avoid confusion. 👍 |
Done :) |
To circle back on this, I've pushed https://hub.docker.com/r/tianon/gosu (549de11), which is usable most trivially across all supported architectures something like: COPY --from=tianon/gosu /gosu /usr/local/bin/ If you want something that's FROM scratch
COPY --from=tianon/gosu /gosu / (I would suggest specifying |
@tianon First of all thank you for this great project! I planned to move to
gosu
sincesu-exec
has some bugs like ncopa/su-exec#21 and does not seem to be taken into account.So as a modest gift for your project, here is a PR that offers some enhancements:
arm/v7
mips/hardfloat
mips/softfloat
mipsle/hardfloat
mipsle/softfloat
mips64/hardfloat
mips64/softfloat
mips64le/hardfloat
mips64le/softfloat
push tag
event semver likev1.13.0
:actions/upload-artifact
tianon/gosu:1.13.0
/tianon/gosu:latest
push
(master branch)actions/upload-artifact
tianon/gosu:edge
pull_request
eventactions/upload-artifact
Everything is already in place and tested on https://github.com/crazy-max/gosu as well as the GitHub Actions pipeline.
Live example of usage through Dockerfile available here.