Skip to content

Commit

Permalink
feat: add alpine-toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
prehor committed Jul 3, 2024
1 parent bfeea8a commit e96d1a2
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,20 @@
"semanticCommitScope": "{{parentDir}}",
"semanticCommitType": "fix"
}
],
"customManagers": [
{
"customType": "regex",
"description": ["Process custom dependencies"],
"fileMatch": [
"(^|/)apps/.+/ci/latest\\.sh$"
],
"matchStrings": [
// # renovate: datasource=docker depName=docker.io/library/alpine
// version="3.20.1"
"datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)\\nversion=\"(?<currentValue>\\d[^\"]+)\""
],
"datasourceTemplate": "{{#if datasource}}{{{datasource}}}{{else}}docker{{/if}}"
}
]
}
2 changes: 1 addition & 1 deletion .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
echo "outputs=${outputs}" >> $GITHUB_OUTPUT
- name: Build Image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
id: build
with:
build-args: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: actions/checkout@v4

- name: Renovate
uses: renovatebot/github-action@v40.1.12
uses: renovatebot/github-action@v40.2.0
with:
configurationFile: .github/renovate.json5
token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
33 changes: 33 additions & 0 deletions apps/alpine-toolbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM docker.io/library/alpine:3.20.0

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"
3 changes: 3 additions & 0 deletions apps/alpine-toolbox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Alpine Linux Toolbox

[Alpine Linux](https://alpinelinux.org) Toolbox image.
4 changes: 4 additions & 0 deletions apps/alpine-toolbox/ci/latest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# renovate: datasource=docker depName=docker.io/library/alpine
version="3.20.0"
printf "%s" "${version}"
9 changes: 9 additions & 0 deletions apps/alpine-toolbox/entrypoint.sh
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 "$@"
9 changes: 9 additions & 0 deletions apps/alpine-toolbox/metadata.yaml
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

0 comments on commit e96d1a2

Please sign in to comment.