-
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
6 changed files
with
65 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
ARG VERSION | ||
FROM docker.io/library/alpine:${VERSION} | ||
|
||
ARG TARGETPLATFORM | ||
ARG VERSION | ||
ARG CHANNEL | ||
|
||
ENV CHARSET="UTF-8" \ | ||
LANG="en_US.UTF-8" \ | ||
TZ="Etc/UTC" | ||
|
||
RUN \ | ||
mkdir /config \ | ||
&& \ | ||
adduser app -D -u 568 -g 568 -h /config \ | ||
&& \ | ||
chown 568:568 /config \ | ||
&& \ | ||
apk add --no-cache \ | ||
bash \ | ||
ca-certificates \ | ||
catatonit \ | ||
curl \ | ||
\ | ||
git \ | ||
grep \ | ||
less | ||
|
||
COPY ./apps/alpine-toolbox/entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/usr/bin/catatonit", "--"] | ||
CMD ["/entrypoint.sh"] | ||
|
||
LABEL org.opencontainers.image.source="https://alpinelinux.org" |
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,3 @@ | ||
# Alpine Linux Toolbox | ||
|
||
[Alpine Linux](https://alpinelinux.org) Toolbox image. |
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 | ||
version=$( | ||
curl -s --fail -H "Content-Type: application/json" 'https://hub.docker.com/v2/repositories/library/alpine/tags/?page_size=1000' | | ||
jq -r '.results|.[]|.name' | | ||
grep -oP '^\d+\.\d+\.\d+$' | | ||
sort -V -r | | ||
head -1 | ||
) | ||
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,9 @@ | ||
#!/bin/bash | ||
|
||
# Uses /bin/bash if no command is given or the first argument is an option | ||
if [[ ${#@} -eq 0 || ${1:0:1} == '-' ]]; then | ||
set -- /bin/bash "$@" | ||
fi | ||
|
||
# Execute command | ||
exec "$@" |
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 @@ | ||
--- | ||
app: alpine-toolbox | ||
semver: true | ||
channels: | ||
- name: stable | ||
platforms: ["linux/amd64"] | ||
stable: true | ||
tests: | ||
enabled: false |