-
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.
- Loading branch information
Showing
5 changed files
with
49 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Define build-time variables | ||
ARG VERSION | ||
FROM ghcr.io/jjgadgets/redbot:${VERSION} AS builder | ||
|
||
# Stage 2: Working app image | ||
FROM gcr.io/distroless/python3-debian12:nonroot@sha256:02c3a74bee78c927ab39dd739f0e56e36675e6adc9032208abb7ed8b83067c74 | ||
USER 1000:1000 | ||
WORKDIR /app | ||
|
||
COPY --chmod=555 --chown=1000:1000 --from=builder /app /app | ||
|
||
ENV VIRTUAL_ENV=/app | ||
ENV PATH="/app/bin:$PATH" | ||
|
||
# ADD --chmod=555 --chown=1000:1000 --checksum=sha256:af8a43230338de67563878a25872ee2fd3d6af0f3513d55dd1ec672ad69dae53 https://github.com/openSUSE/catatonit/releases/download/v0.2.0/catatonit.x86_64 /catatonit | ||
|
||
USER 1000:1000 | ||
VOLUME ["/config"] | ||
# ENTRYPOINT ["/catatonit", "--", "/app/bin/python3", "/app/bin/entrypoint.py"] | ||
ENTRYPOINT ["python3", "/app/entrypoint.py"] |
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,9 @@ | ||
#!/usr/bin/env bash | ||
channel=$1 | ||
|
||
if [[ "${channel}" == "stable" ]]; then | ||
version="$(curl -sX GET "https://api.github.com/repos/Cog-Creators/Red-DiscordBot/releases/latest" | jq --raw-output '.tag_name' 2>/dev/null)" | ||
fi | ||
version="${version#*v}" | ||
version="${version#*release-}" | ||
printf "%s" "${version}" |
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,16 @@ | ||
--- | ||
app: redbot-distroless | ||
base: false | ||
channels: | ||
- &c | ||
name: stable | ||
platforms: | ||
- "linux/amd64" | ||
# - "linux/arm64" | ||
stable: true | ||
tests: | ||
enabled: false # TODO: pass env vars and/or args to `dgoss run` tests: "invalid config: host must be set" | ||
# type: web | ||
#- <<: *c | ||
# name: master | ||
# stable: false |
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,6 +1,6 @@ | ||
--- | ||
app: redbot | ||
base: false | ||
base: true | ||
channels: | ||
- &c | ||
name: stable | ||
|