This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
forked from heroku/base-images
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'multiarch-push' into multiarch-push-robuust
# Conflicts: # .github/workflows/ci.yml # bin/build.sh # heroku-22-build/Dockerfile
- Loading branch information
Showing
19 changed files
with
2,535 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
dockerhub_token=$(curl -sS -f --retry 3 --retry-connrefused --connect-timeout 5 --max-time 30 -H "Content-Type: application/json" -X POST -d "{\"username\": \"${DOCKER_HUB_USERNAME}\", \"password\": \"${DOCKER_HUB_TOKEN}\"}" https://hub.docker.com/v2/users/login/ | jq --exit-status -r .token) | ||
|
||
unpublish_group() { | ||
local stackVersion="$1" | ||
local targetTagSuffix="$2" | ||
local status=0 | ||
variants=("" "-build") | ||
if (( stackVersion <= 22 )); then | ||
variants+=("-cnb" "-cnb-build") | ||
fi | ||
for variant in "${variants[@]}"; do | ||
targetTagName="${stackVersion}${variant}${targetTagSuffix}" | ||
echo "Deleting heroku/heroku:${targetTagName}" | ||
response=$(curl -sS --retry 3 --retry-connrefused --connect-timeout 5 --max-time 30 -X DELETE \ | ||
-H "Authorization: JWT ${dockerhub_token}" \ | ||
"https://hub.docker.com/v2/namespaces/heroku/repositories/heroku/tags/${targetTagName}" | ||
) | ||
|
||
if [[ -z $response ]]; then | ||
>&2 echo "Deleted." | ||
elif [[ $response =~ "tag not found" ]]; then | ||
>&2 echo "Tag does not exist." | ||
else | ||
>&2 echo "Couldn't delete. Response: ${response}" | ||
status=22 | ||
fi | ||
done | ||
return $status | ||
} | ||
|
||
stackVersion="${1:-$STACK_VERSION}" | ||
tempTagSuffix="${2:-".temp-$GITHUB_RUN_ID"}" | ||
# delete each tag in a group on Docker Hub. | ||
unpublish_group "${stackVersion}" "${tempTagSuffix}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
FROM heroku/heroku:20 | ||
ARG BASE_IMAGE=heroku/heroku:20 | ||
FROM $BASE_IMAGE | ||
COPY setup.sh /tmp/setup.sh | ||
RUN /tmp/setup.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM heroku/heroku:20 | ||
ARG BASE_IMAGE=heroku/heroku:20 | ||
FROM $BASE_IMAGE | ||
|
||
RUN ln -s /workspace /app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
FROM robuust/heroku:22 | ||
ARG BASE_IMAGE=robuust/heroku:22 | ||
FROM $BASE_IMAGE | ||
COPY setup.sh /tmp/setup.sh | ||
RUN /tmp/setup.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM heroku/heroku:22 | ||
ARG BASE_IMAGE=heroku/heroku:22 | ||
FROM $BASE_IMAGE | ||
|
||
RUN ln -s /workspace /app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
installed-packages*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG BASE_IMAGE=heroku/heroku:24 | ||
FROM $BASE_IMAGE | ||
USER root | ||
RUN --mount=target=/build /build/setup.sh | ||
|
||
# https://github.com/buildpacks/spec/blob/main/platform.md#build-image | ||
USER 1002 | ||
ENV CNB_USER_ID=1002 | ||
ENV CNB_GROUP_ID=1000 | ||
ENV CNB_STACK_ID "heroku-24" | ||
ENV CNB_TARGET_OS=$TARGETOS | ||
ENV CNB_TARGET_ARCH=$TARGETARCH |
Oops, something went wrong.