Visitar URL original
adjust supercronic download to allow multiarch builds by guidopetri · Pull Request #1053 · stringer-rss/stringer · GitHub
Skip to content

adjust supercronic download to allow multiarch builds - #1053

Merged
mockdeep merged 1 commit into
stringer-rss:mainfrom
guidopetri:patch-1
Jul 8, 2023
Merged

mockdeep merged 1 commit into
stringer-rss:mainfrom
guidopetri:patch-1

Conversation

@guidopetri

@guidopetri guidopetri commented Jul 6, 2023 •

Copy link
Copy Markdown
Collaborator

The download of supercronic in the Dockerfile hardcodes amd64 as the architecture, but we can make it flexible to allow for multiarch builds.

For this purpose I added all three of the SHA1SUMs and just select the "correct" one to use based on the ARCH build argument (which has a default of amd64).

This built successfully for me with the command:

docker build -t stringer-arch-test --build-arg ARCH=arm64 .

(as well as arm and amd64)

I changed the shell that executes the Dockerfile to bash to take advantage of the ${!ENV_VAR_CONTAINING_OTHER_ENV_VAR_NAME} construction - the SUPERCRONIC_SHA1SUM arg contains one of SUPERCRONIC_{amd64,arm,arm64}_SHA1SUM, and we need to evaluate this value as an env var. The easiest way to do this with /bin/sh seems to be eval echo \$$SUPERCRONIC_SHA1SUM, but that's a bit unsafe since we're using eval so I selected to switch to bash instead.

@guidopetri
guidopetri marked this pull request as ready for review July 7, 2023 01:20
@guidopetri

Copy link
Copy Markdown
Collaborator Author

@mockdeep / @hozza I think this is ready for review :)

@mockdeep

mockdeep commented Jul 7, 2023

Copy link
Copy Markdown
Collaborator

This all looks pretty reasonable to me. Since we've moved to GoodJob, we might eventually be able to use their repeating jobs support, but I think it makes sense to get this working for now.

@hozza do you want to take a look before I merge this?

@mockdeep
mockdeep merged commit 5742556 into stringer-rss:main Jul 8, 2023
@mockdeep

mockdeep commented Jul 8, 2023

Copy link
Copy Markdown
Collaborator

thanks @guidopetri!

@guidopetri
guidopetri deleted the patch-1 branch July 8, 2023 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants