Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
5d7af66514 | |||
55d9707d24 | |||
4250455f66 | |||
d54807cce9 | |||
2b7e1fec89 |
@ -1,15 +0,0 @@
|
|||||||
name: Run tests wf
|
|
||||||
on:
|
|
||||||
registry_package:
|
|
||||||
types: [published, updated]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-process:
|
|
||||||
runs-on: alt-sisyphus
|
|
||||||
steps:
|
|
||||||
- name: Check event
|
|
||||||
run: |
|
|
||||||
echo "name package = ${{ github.event.registry_package.name }}"
|
|
||||||
echo "path package = ${{ github.event.registry_package.html_url }}"
|
|
||||||
echo "version package = ${{ github.event.registry_package.package_version.version }}"
|
|
||||||
echo "version package = ${{ github.event.registry_package.package_version.container_metadata.tag.name }}"
|
|
@ -1,83 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#$1 - ${{ needs.build-process.outputs.branch }}
|
|
||||||
#$2 - ${{ needs.build-process.outputs.org }}
|
|
||||||
#$3 - ${{ needs.build-process.outputs.url }}
|
|
||||||
#$4 - ${{ needs.build-process.outputs.repo }}
|
|
||||||
#$5 - ${{ gitea.workspace }}
|
|
||||||
|
|
||||||
BR=${1:-"p10"}
|
|
||||||
ORG=${2:-"base"}
|
|
||||||
URL=${3:-"gitea.basealt.ru"}
|
|
||||||
REPO=${4:-"alt"}
|
|
||||||
WS=${5:-"image-forge"}
|
|
||||||
wspath="/workspace/$REPO/$WS"
|
|
||||||
|
|
||||||
errors=''
|
|
||||||
haserr=false
|
|
||||||
for IM in $(ls $wspath/org/$ORG/ | xargs)
|
|
||||||
do
|
|
||||||
echo "image=$IM"
|
|
||||||
imgpath="$REPO/$BR/$ORG/$IM:$BR"
|
|
||||||
command=''
|
|
||||||
testpath="$wspath/org/$ORG/$IM/test.yaml"
|
|
||||||
if test -f $testpath
|
|
||||||
then
|
|
||||||
entrypoint=''
|
|
||||||
testep=$(cat $testpath | yq '.entrypoint' -r 2> /dev/null)
|
|
||||||
if [[ $testep != '' ]]; then entrypoint="--entrypoint=\"$testep\""; fi
|
|
||||||
|
|
||||||
testcom=$(cat $testpath | yq '.command' -r 2> /dev/null)
|
|
||||||
if [[ $testcom != '' ]]
|
|
||||||
then command="podman run --rm $entrypoint $URL/$imgpath -c \"$testcom\""
|
|
||||||
else echo "test command is not found"
|
|
||||||
fi
|
|
||||||
else echo "test file is not found"
|
|
||||||
fi
|
|
||||||
echo "result test command: $command"
|
|
||||||
eval $command 2>$IM.log || haserr=true
|
|
||||||
|
|
||||||
if [ "$haserr" = false ]
|
|
||||||
then
|
|
||||||
echo "start change tag for $IM"
|
|
||||||
if [[ $ORG != 'base' ]]
|
|
||||||
then
|
|
||||||
package=$(podman images --filter reference=$URL/$imgpath --format='{{ json .Labels }}' | jq '."org.opencontainers.image.title"' -r 2> /dev/null)
|
|
||||||
if [[ $package != '' ]]
|
|
||||||
then
|
|
||||||
tag=$(podman run --rm --entrypoint="/bin/sh" $URL/$imgpath -c "rpm -qa --qf \"%{VERSION}\n\" $package" 2> /dev/null)
|
|
||||||
else
|
|
||||||
echo "not found package name in images labels"
|
|
||||||
fi
|
|
||||||
else tag=$(date +"%Y%m%d")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $tag != '' ]]
|
|
||||||
then
|
|
||||||
echo "newtag=$tag"
|
|
||||||
newimgpath="$REPO/$BR/$ORG/$IM:$tag"
|
|
||||||
skopeo copy -a docker://$URL/$imgpath docker://$URL/$newimgpath
|
|
||||||
#skopeo delete docker://$URL/$imgpath
|
|
||||||
echo "tag is updated"
|
|
||||||
else echo "new tag is empty and is not sent to repository"
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
if [[ $(cat $IM.log) != '' ]]
|
|
||||||
then errors="TEST ERROR OF IMAGE $IM: $(cat $IM.log); $errors"
|
|
||||||
else errors="TEST ERROR OF IMAGE $IM: test returned empty error, but exit status was nozero; $errors"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "podman rmi --all"
|
|
||||||
podman rmi --all
|
|
||||||
|
|
||||||
haserr=false
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "$errors"
|
|
||||||
if [[ $errors != '' ]]
|
|
||||||
then haserr=true
|
|
||||||
fi
|
|
||||||
echo "ERR=$haserr" > haserr.log
|
|
||||||
echo $errors > errors.log
|
|
136
.gitea/workflows/wf.yaml
Normal file
136
.gitea/workflows/wf.yaml
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
name: Building alt images
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*_*/*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_process:
|
||||||
|
runs-on: alt-latest
|
||||||
|
outputs:
|
||||||
|
branch: ${{ env.BRANCH }}
|
||||||
|
image: ${{ env.IMAGE }}
|
||||||
|
url: ${{ env.URL }}
|
||||||
|
repo: ${{ env.REPO }}
|
||||||
|
buildres: ${{ steps.build_script.outcome }}
|
||||||
|
test: ${{ env.TEST }}
|
||||||
|
steps:
|
||||||
|
- name: Check workspace
|
||||||
|
run: |
|
||||||
|
repourl=$(echo $GU | cut -d '/' -f 3)
|
||||||
|
echo "URL=$repourl" >> ${GITHUB_ENV}
|
||||||
|
reponame=$(echo $GR | cut -d '/' -f 1)
|
||||||
|
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
||||||
|
env:
|
||||||
|
GU: ${{ gitea.server_url }}
|
||||||
|
GR: ${{ gitea.repository }}
|
||||||
|
- name: Update apt
|
||||||
|
run: |
|
||||||
|
echo "apt-get update -y && apt-get install -y apt rpm"
|
||||||
|
apt-get update -y && apt-get install -y apt rpm
|
||||||
|
- name: Install requires
|
||||||
|
run: |
|
||||||
|
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq"
|
||||||
|
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq
|
||||||
|
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc"
|
||||||
|
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc
|
||||||
|
- name: Check out current repo
|
||||||
|
uses: https://gitea.com/actions/checkout@v4
|
||||||
|
- name: Login podman gitea
|
||||||
|
run: |
|
||||||
|
echo "podman login ${{ env.URL }}"
|
||||||
|
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
|
||||||
|
env:
|
||||||
|
P_USER: ${{ secrets.PODMAN_USER }}
|
||||||
|
P_PASS: ${{ secrets.PODMAN_PASS }}
|
||||||
|
- name: Check files in the repository
|
||||||
|
run: |
|
||||||
|
ls -a ${{ gitea.workspace }}
|
||||||
|
- name: Parse target branch and tag from events context, save to env
|
||||||
|
env:
|
||||||
|
EV: ${{ toJson(gitea.event) }}
|
||||||
|
run: |
|
||||||
|
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1
|
||||||
|
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1 >> ${GITHUB_ENV}
|
||||||
|
localimage=$(echo $EV | jq '.ref' -r | sed 's/refs\/tags\///g' | cut -d '_' -f 2)
|
||||||
|
echo "IMAGE=$localimage" >> ${GITHUB_ENV}
|
||||||
|
echo "IMAGE=$localimage"
|
||||||
|
- name: Get test for image
|
||||||
|
run: |
|
||||||
|
testscript=$(cat ${{ gitea.workspace }}/org/$IM/test)
|
||||||
|
echo "TEST=$testscript">> ${GITHUB_ENV}
|
||||||
|
env:
|
||||||
|
IM: ${{ env.IMAGE }}
|
||||||
|
BR: ${{ env.BRANCH }}
|
||||||
|
- name: Run building script
|
||||||
|
id: build_script
|
||||||
|
run: |
|
||||||
|
echo "build.py -i $IM -b $BR"
|
||||||
|
if [[ $BR == 'sisyphus' ]]; then ${{ gitea.workspace }}/build.py -i $IM -b $BR --skip-arches arm; else ${{ gitea.workspace }}/build.py -i $IM -b $BR; fi
|
||||||
|
env:
|
||||||
|
IM: ${{ env.IMAGE }}
|
||||||
|
BR: ${{ env.BRANCH }}
|
||||||
|
continue-on-error: true
|
||||||
|
test_process:
|
||||||
|
if: ${{ jobs.build_process.env.BUILDRES == 'success' }}
|
||||||
|
needs: build_process
|
||||||
|
runs-on: alt-latest
|
||||||
|
outputs:
|
||||||
|
testres: ${{ steps.test_script.outcome }}
|
||||||
|
steps:
|
||||||
|
- name: Update apt
|
||||||
|
run: |
|
||||||
|
echo "apt-get update -y && apt-get install -y apt rpm"
|
||||||
|
apt-get update -y && apt-get install -y apt rpm
|
||||||
|
- name: Install requires
|
||||||
|
run: |
|
||||||
|
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah"
|
||||||
|
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah
|
||||||
|
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc"
|
||||||
|
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc
|
||||||
|
- name: Run test
|
||||||
|
id: test_script
|
||||||
|
continue-on-error: true
|
||||||
|
uses: https://gitea.basealt.ru/actions/podman-run-action@v2
|
||||||
|
with:
|
||||||
|
image: ${{ needs.build_process.outputs.url }}/${{ needs.build_process.outputs.repo }}/${{ needs.build_process.outputs.image }}:${{ needs.build_process.outputs.branch }}
|
||||||
|
options: --rm
|
||||||
|
run: ${{ needs.build_process.outputs.test }}
|
||||||
|
finish_process:
|
||||||
|
needs: [ build_process, test_process ]
|
||||||
|
runs-on: alt-latest
|
||||||
|
steps:
|
||||||
|
- name: Update apt
|
||||||
|
run: |
|
||||||
|
echo "apt-get update -y && apt-get install -y apt rpm"
|
||||||
|
apt-get update -y && apt-get install -y apt rpm
|
||||||
|
- name: Update apt
|
||||||
|
run: |
|
||||||
|
echo "apt-get install -y curl jq"
|
||||||
|
apt-get install -y curl jq
|
||||||
|
- name: Delete event tag
|
||||||
|
run: |
|
||||||
|
tagname=$(echo $EV | jq '.ref' -r | sed "s/refs\/tags\///g")
|
||||||
|
curl -X 'DELETE' "https://$URL/api/v1/repos/$REPO/gitea-image-forge/tags/$tagname?token=$T" -H 'accept: application/json' -s
|
||||||
|
echo "tag $BR_$IM is deleted"
|
||||||
|
env:
|
||||||
|
T: ${{ secrets.TOKEN }}
|
||||||
|
URL: ${{ needs.build_process.outputs.url }}
|
||||||
|
REPO: ${{ needs.build_process.outputs.repo }}
|
||||||
|
IM: ${{ needs.build_process.outputs.image}}
|
||||||
|
BR: ${{ needs.build_process.outputs.branch }}
|
||||||
|
EV: ${{ toJson(gitea.event) }}
|
||||||
|
continue-on-error: true
|
||||||
|
- name: Send comment to issue for notification
|
||||||
|
run: |
|
||||||
|
issueid=$(curl -X 'GET' "https://$URL/api/v1/repos/$REPO/gitea-image-forge/issues?state=all&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r)
|
||||||
|
if [[ ${ needs.build_process.outputs.buildres }} = "success" ]] && [[ ${{ needs.test_process.outputs.testres }} = "success" ]]; then body="Building of image $IM for branch $BR finished success"; else body="Testing of image $IM for branch $BR is failed"; fi
|
||||||
|
if [[ ${{ needs.build_process.outputs.buildres }} != 'success' ]]; then body="Building of image $IM for branch $BR is failed"; fi
|
||||||
|
curl -X 'POST' "https://$URL/api/v1/repos/$REPO/gitea-image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
|
||||||
|
echo "notification is sent"
|
||||||
|
env:
|
||||||
|
T: ${{ secrets.TOKEN }}
|
||||||
|
URL: ${{ needs.build_process.outputs.url }}
|
||||||
|
REPO: ${{ needs.build_process.outputs.repo }}
|
||||||
|
IM: ${{ needs.build_process.outputs.image}}
|
||||||
|
BR: ${{ needs.build_process.outputs.image}}
|
@ -1,195 +0,0 @@
|
|||||||
name: Full building alt images
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*_*'
|
|
||||||
tags-ignore:
|
|
||||||
- '*_k8s'
|
|
||||||
- 'sisyphus_*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-process:
|
|
||||||
runs-on: alt-p10
|
|
||||||
outputs:
|
|
||||||
branch: ${{ env.BRANCH }}
|
|
||||||
org: ${{ env.ORG }}
|
|
||||||
url: ${{ env.URL }}
|
|
||||||
repo: ${{ env.REPO }}
|
|
||||||
ws: ${{ env.WS }}
|
|
||||||
buildres: ${{ steps.build-script.outcome }}
|
|
||||||
steps:
|
|
||||||
- name: Check workspace
|
|
||||||
run: |
|
|
||||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
|
||||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
|
||||||
echo $repourl
|
|
||||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
|
||||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
|
||||||
echo $reponame
|
|
||||||
repows=$(echo $GR | cut -d '/' -f 2)
|
|
||||||
echo "WS=$repows" >> ${GITHUB_ENV}
|
|
||||||
echo $repows
|
|
||||||
env:
|
|
||||||
GU: ${{ gitea.server_url }}
|
|
||||||
GR: ${{ gitea.repository }}
|
|
||||||
- name: Set repo for c10f2 (Temporary)
|
|
||||||
if: ${{ contains(github.ref_name, 'c10f2') }}
|
|
||||||
run: |
|
|
||||||
echo "event tag=${{ github.ref_name }}"
|
|
||||||
echo "10.4.0.3 update.altsp.su" >> /etc/hosts
|
|
||||||
echo "cat /etc/hosts"
|
|
||||||
cat /etc/hosts
|
|
||||||
- name: Update apt
|
|
||||||
uses: actions/init-alt-env@v1
|
|
||||||
- name: Install requires
|
|
||||||
run: |
|
|
||||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl"
|
|
||||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl
|
|
||||||
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc"
|
|
||||||
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc
|
|
||||||
- name: Check out current repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Parse target branch and tag from events context, save to env
|
|
||||||
env:
|
|
||||||
EV: ${{ toJson(gitea.event) }}
|
|
||||||
run: |
|
|
||||||
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1
|
|
||||||
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1 >> ${GITHUB_ENV}
|
|
||||||
org=$(echo $EV | jq '.ref' -r | sed 's/refs\/tags\///g' | cut -d '_' -f 2)
|
|
||||||
echo "ORG=$org" >> ${GITHUB_ENV}
|
|
||||||
echo "ORG=$org"
|
|
||||||
- name: Login podman gitea
|
|
||||||
run: |
|
|
||||||
echo "podman login ${{ env.URL }}"
|
|
||||||
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
|
|
||||||
env:
|
|
||||||
P_USER: ${{ secrets.PODMAN_USER }}
|
|
||||||
P_PASS: ${{ secrets.PODMAN_PASS }}
|
|
||||||
- name: Run standart building script
|
|
||||||
id: build-script
|
|
||||||
run: |
|
|
||||||
build_args="-b $BR -o $ORG --skip-images base/distroless-devel --registry $URL/$REPO/$BR -a amd64"
|
|
||||||
echo "build.py $build_args"
|
|
||||||
${{ gitea.workspace }}/build.py $build_args
|
|
||||||
env:
|
|
||||||
ORG: ${{ env.ORG }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
REPO: ${{ env.REPO }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: Send notification if build crashed
|
|
||||||
if: ${{ steps.build-script.outcome != 'success' }}
|
|
||||||
run: |
|
|
||||||
issueid=1
|
|
||||||
body="Building images finish with some errors."
|
|
||||||
curl -X 'POST' "$URL/api/v1/repos/$REPO/$GWS/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
|
|
||||||
echo "notification about test error is sent to issue $issueid"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ env.REPO }}
|
|
||||||
GWS: ${{ env.WS }}
|
|
||||||
- name: Delete event tag
|
|
||||||
run: |
|
|
||||||
tagname=$(echo $EV | jq '.ref' -r | sed "s/refs\/tags\///g")
|
|
||||||
curl -X 'DELETE' "$URL/api/v1/repos/$REPO/$GWS/tags/$tagname?token=$T" -H 'accept: application/json' -s
|
|
||||||
echo "tag $tagname is deleted"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ env.REPO }}
|
|
||||||
GWS: ${{ env.WS }}
|
|
||||||
EV: ${{ toJson(gitea.event) }}
|
|
||||||
test-process:
|
|
||||||
needs: build-process
|
|
||||||
if: ${{ needs.build-process.outputs.buildres == 'success' }}
|
|
||||||
runs-on: alt-p10
|
|
||||||
outputs:
|
|
||||||
testres: ${{ steps.test-script.outcome }}
|
|
||||||
steps:
|
|
||||||
- name: Update apt
|
|
||||||
uses: actions/init-alt-env@v1
|
|
||||||
- name: Install requires
|
|
||||||
run: |
|
|
||||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah skopeo jq yq curl"
|
|
||||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah skopeo jq yq curl
|
|
||||||
- name: Check out current repo
|
|
||||||
uses: https://gitea.com/actions/checkout@v4
|
|
||||||
- name: Login podman gitea
|
|
||||||
run: |
|
|
||||||
echo "podman login ${{ needs.build-process.outputs.url }}"
|
|
||||||
podman login --username $P_USER --password $P_PASS ${{ needs.build-process.outputs.url }}
|
|
||||||
env:
|
|
||||||
P_USER: ${{ secrets.PODMAN_USER }}
|
|
||||||
P_PASS: ${{ secrets.PODMAN_PASS }}
|
|
||||||
- name: Test images and update tags
|
|
||||||
id: test-script
|
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
|
||||||
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $GWS
|
|
||||||
cat haserr.log >> ${GITHUB_ENV}
|
|
||||||
echo "test process finished"
|
|
||||||
env:
|
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
|
||||||
ORG: ${{ needs.build-process.outputs.org }}
|
|
||||||
URL: ${{ needs.build-process.outputs.url }}
|
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
|
||||||
WS: ${{ gitea.workspace }}
|
|
||||||
GWS: ${{ needs.build-process.outputs.ws }}
|
|
||||||
- name: Send notification if test crashed
|
|
||||||
if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }}
|
|
||||||
run: |
|
|
||||||
issueid=1
|
|
||||||
d errors=$(cat errors.log)
|
|
||||||
body="Testing images finish with some errors. $errors"
|
|
||||||
curl -X 'POST' "$URL/api/v1/repos/$REPO/gitea-image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
|
|
||||||
echo "notification about test error is sent to issue $issueid"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
|
||||||
push-process:
|
|
||||||
needs: [build-process, test-process]
|
|
||||||
if: ${{ needs.test-process.outputs.testres == 'success' && secrets.PUSH_REPO != '' }}
|
|
||||||
runs-on: alt-p10
|
|
||||||
steps:
|
|
||||||
- name: Update apt
|
|
||||||
uses: actions/init-alt-env@v1
|
|
||||||
- name: Install reqier-s
|
|
||||||
run: |
|
|
||||||
echo "apt-get install -y skopeo jq"
|
|
||||||
apt-get install -y skopeo jq
|
|
||||||
- name: Get branch and tags to push
|
|
||||||
run: |
|
|
||||||
echo "PUSH_BRANCH=$BR" >> ${GITHUB_ENV}
|
|
||||||
images=$()
|
|
||||||
echo "PUSH_IMAGES=$images" >> ${GITHUB_ENV}
|
|
||||||
if [[ $BR == 'p10' ]]; then echo "PUSH_TAGS=latest" >> ${GITHUB_ENV}; fi
|
|
||||||
env:
|
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
|
||||||
- name: Get branch (only for c*N branches)
|
|
||||||
if: ${{ contains(github.ref_name, 'c10f2') }}
|
|
||||||
run: |
|
|
||||||
newbr=$(skopeo list-tags docker://$URL/$REPO/$BR/base/alt | jq '.Tags.[]' -r 2> /dev/null | sort | grep -m 1 c 2> /dev/null)
|
|
||||||
echo "PUSH_BRANCH=$newbr" >> ${GITHUB_ENV}
|
|
||||||
env:
|
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
|
||||||
ORG: ${{ needs.build-process.outputs.org }}
|
|
||||||
URL: ${{ needs.build-process.outputs.url }}
|
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
|
||||||
- name: Run skopeo action
|
|
||||||
if: ${{ env.PUSH_BRANCH == needs.build-process.outputs.branch }}
|
|
||||||
uses: actions/skopeo-copy@v1
|
|
||||||
with:
|
|
||||||
source: ${{ needs.build-process.outputs.url }/${{ needs.build-process.outputs.repo }}/${{ needs.build-process.outputs.branch }}/${{ needs.build-process.outputs.org }}
|
|
||||||
source-proto: docker://
|
|
||||||
dest: ${{ secrets.PUSH_REPO }}/${{ needs.build-process.outputs.branch }}
|
|
||||||
dest-proto: docker://
|
|
||||||
dest-login: ${{ secrets.PUSH_USER }}
|
|
||||||
dest-pass: ${{ secrets.PUSH_PASS }}
|
|
||||||
tags: ${{ env.PUSH_TAGS }}
|
|
||||||
last-ver-tags: true
|
|
||||||
images: ${{ env.PUSH_IMAGES }}
|
|
||||||
args: -a
|
|
@ -1,126 +0,0 @@
|
|||||||
name: Full building alt images
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'sisyphus_*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-process:
|
|
||||||
runs-on: alt-sisyphus
|
|
||||||
outputs:
|
|
||||||
branch: ${{ env.BRANCH }}
|
|
||||||
org: ${{ env.ORG }}
|
|
||||||
url: ${{ env.URL }}
|
|
||||||
repo: ${{ env.REPO }}
|
|
||||||
buildres: ${{ steps.build-script.outcome }}
|
|
||||||
steps:
|
|
||||||
- name: Check workspace
|
|
||||||
run: |
|
|
||||||
repourl=$(echo $GU | cut -d '/' -f 3)
|
|
||||||
echo "URL=$repourl" >> ${GITHUB_ENV}
|
|
||||||
echo $repourl
|
|
||||||
reponame=$(echo $GR | cut -d '/' -f 1)
|
|
||||||
echo "REPO=$reponame" >> ${GITHUB_ENV}
|
|
||||||
echo $reponame
|
|
||||||
env:
|
|
||||||
GU: ${{ gitea.server_url }}
|
|
||||||
GR: ${{ gitea.repository }}
|
|
||||||
- name: Update apt
|
|
||||||
uses: actions/init-alt-env@v1
|
|
||||||
- name: Install requires
|
|
||||||
run: |
|
|
||||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl"
|
|
||||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl
|
|
||||||
echo "apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc"
|
|
||||||
apt-get install -y qemu-user-static-binfmt-aarch64 qemu-user-static-binfmt-arm qemu-user-static-binfmt-ppc
|
|
||||||
- name: Check out current repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Parse target branch and tag from events context, save to env
|
|
||||||
env:
|
|
||||||
EV: ${{ toJson(gitea.event) }}
|
|
||||||
run: |
|
|
||||||
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1
|
|
||||||
echo $EV | jq '.ref' -r | sed "s/refs\/tags\//BRANCH=/g" | cut -d '_' -f 1 >> ${GITHUB_ENV}
|
|
||||||
org=$(echo $EV | jq '.ref' -r | sed 's/refs\/tags\///g' | cut -d '_' -f 2)
|
|
||||||
echo "ORG=$org" >> ${GITHUB_ENV}
|
|
||||||
echo "ORG=$org"
|
|
||||||
- name: Login podman gitea
|
|
||||||
run: |
|
|
||||||
echo "podman login ${{ env.URL }}"
|
|
||||||
podman login --username $P_USER --password $P_PASS ${{ env.URL }}
|
|
||||||
env:
|
|
||||||
P_USER: ${{ secrets.PODMAN_USER }}
|
|
||||||
P_PASS: ${{ secrets.PODMAN_PASS }}
|
|
||||||
- name: Run building script
|
|
||||||
id: build-script
|
|
||||||
run: |
|
|
||||||
build_args="-b $BR -o $ORG --skip-images alt/distroless-devel"
|
|
||||||
if [[ $ORG == 'k8s' ]]; then build_args="$build_args --tags tags.toml --overwrite-organization $ORG-$BR --skip-images k8s/kube-apiserver k8s/kube-controller-manager k8s/kube-proxy k8s/kube-scheduler"; fi
|
|
||||||
echo "build.py $build_args"
|
|
||||||
${{ gitea.workspace }}/build.py $build_args
|
|
||||||
env:
|
|
||||||
ORG: ${{ env.ORG }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: Send notification if build crashed
|
|
||||||
if: ${{ steps.build-script.outcome != 'success' }}
|
|
||||||
run: |
|
|
||||||
issueid=1
|
|
||||||
body="Building images finish with some errors."
|
|
||||||
curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
|
|
||||||
echo "notification about test error is sent to issue $issueid"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ env.REPO }}
|
|
||||||
- name: Delete event tag
|
|
||||||
run: |
|
|
||||||
tagname=$(echo $EV | jq '.ref' -r | sed "s/refs\/tags\///g")
|
|
||||||
curl -X 'DELETE' "$URL/api/v1/repos/$REPO/image-forge/tags/$tagname?token=$T" -H 'accept: application/json' -s
|
|
||||||
echo "tag $tagname is deleted"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ env.BRANCH }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ env.REPO }}
|
|
||||||
EV: ${{ toJson(gitea.event) }}
|
|
||||||
test-process:
|
|
||||||
needs: build-process
|
|
||||||
if: ${{ needs.build-process.outputs.buildres == 'success' }}
|
|
||||||
runs-on: alt-sisyphus
|
|
||||||
steps:
|
|
||||||
- name: Update apt
|
|
||||||
uses: actions/init-alt-env@v1
|
|
||||||
- name: Install requires
|
|
||||||
run: |
|
|
||||||
echo "apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl"
|
|
||||||
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl
|
|
||||||
- name: Check out current repo
|
|
||||||
uses: https://gitea.com/actions/checkout@v4
|
|
||||||
- name: Test
|
|
||||||
id: test-script
|
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
|
||||||
$WS/.gitea/workflows/testscript $BR $ORG $URL $REPO $WS
|
|
||||||
cat haserr.log >> ${GITHUB_ENV}
|
|
||||||
echo "test process finished"
|
|
||||||
env:
|
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
|
||||||
ORG: ${{ needs.build-process.outputs.org }}
|
|
||||||
URL: ${{ needs.build-process.outputs.url }}
|
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
|
||||||
WS: ${{ gitea.workspace }}
|
|
||||||
- name: Send notification if test crashed
|
|
||||||
if: ${{ env.ERR == 'true' || steps.test-script.outcome == 'failure' }}
|
|
||||||
run: |
|
|
||||||
issueid=1
|
|
||||||
errors=$(cat errors.log)
|
|
||||||
body="Testing images finish with some errors. $errors"
|
|
||||||
curl -X 'POST' "$URL/api/v1/repos/$REPO/image-forge/issues/$issueid/comments?token=$T" -H 'accept: application/json' -H 'Content-Type: application/json' -d "{ \"body\": \"$body\" }" -s
|
|
||||||
echo "notification about test error is sent to issue $issueid"
|
|
||||||
env:
|
|
||||||
T: ${{ secrets.TOKEN }}
|
|
||||||
BR: ${{ needs.build-process.outputs.branch }}
|
|
||||||
URL: ${{ gitea.server_url }}
|
|
||||||
REPO: ${{ needs.build-process.outputs.repo }}
|
|
@ -1,21 +0,0 @@
|
|||||||
name: 'Reusable test job'
|
|
||||||
description: 'Test for images'
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
result:
|
|
||||||
description: "Result of test (success|failure)"
|
|
||||||
value: ${{ jobs.example_job.outputs.output1 }}
|
|
||||||
inputs:
|
|
||||||
image: string
|
|
||||||
branch: string
|
|
||||||
url: string
|
|
||||||
repo: string
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: 'composite'
|
|
||||||
steps:
|
|
||||||
- name: Install requires
|
|
||||||
run: |
|
|
||||||
echo "apt-get install -y skopeo jq"
|
|
||||||
apt-get install -y skopeo jq
|
|
||||||
- name: Scopeo copy
|
|
23
.gitea/workflows/wf_test.yaml
Normal file
23
.gitea/workflows/wf_test.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: Test_wf
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Test-job:
|
||||||
|
runs-on: alt-latest
|
||||||
|
env:
|
||||||
|
TEST: "gitea --version"
|
||||||
|
steps:
|
||||||
|
- name: Update apt
|
||||||
|
run: apt-get update -y && apt-get install -y apt rpm
|
||||||
|
- name: Install reqs
|
||||||
|
run: apt-get install -y podman buildah
|
||||||
|
- name: Podman run
|
||||||
|
uses: https://gitea.basealt.ru/actions/podman-run-action@v2
|
||||||
|
with:
|
||||||
|
image: gitea.basealt.ru/images_repo/alt/gitea
|
||||||
|
options: --rm
|
||||||
|
run: ${{ env.TEST }}
|
||||||
|
- run: echo "This job's status is ${{ job.status }}"
|
@ -32,3 +32,5 @@ On x86_64 machine using p10 branch you need:
|
|||||||
- `qemu-user-static-binfmt-aarch64` to build for arm64 architecture
|
- `qemu-user-static-binfmt-aarch64` to build for arm64 architecture
|
||||||
- `qemu-user-static-binfmt-arm` to build for arm architecture
|
- `qemu-user-static-binfmt-arm` to build for arm architecture
|
||||||
- `qemu-user-static-binfmt-ppc` to build for ppc64le architecture
|
- `qemu-user-static-binfmt-ppc` to build for ppc64le architecture
|
||||||
|
|
||||||
|
|
||||||
|
50
build.py
50
build.py
@ -225,19 +225,19 @@ class DockerBuilder:
|
|||||||
self,
|
self,
|
||||||
template: str,
|
template: str,
|
||||||
organization: str,
|
organization: str,
|
||||||
install_packages=None,
|
install_pakages=None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> str:
|
) -> str:
|
||||||
if self.registry:
|
if self.registry:
|
||||||
registry = self.registry.rstrip("/") + "/"
|
registry = self.registry.rstrip("/") + "/"
|
||||||
alt_image = "base/alt"
|
alt_image = "alt/alt"
|
||||||
else:
|
else:
|
||||||
registry = ""
|
registry = ""
|
||||||
alt_image = "alt"
|
alt_image = "alt"
|
||||||
rendered = Template(template).render(
|
rendered = Template(template).render(
|
||||||
alt_image=alt_image,
|
alt_image=alt_image,
|
||||||
branch=self.branch,
|
branch=self.branch,
|
||||||
install_packages=install_packages,
|
install_pakages=install_pakages,
|
||||||
organization=organization,
|
organization=organization,
|
||||||
registry=registry,
|
registry=registry,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
@ -247,7 +247,7 @@ class DockerBuilder:
|
|||||||
|
|
||||||
@forall_images(consume_result=True)
|
@forall_images(consume_result=True)
|
||||||
def render_dockerfiles(self, **kwargs):
|
def render_dockerfiles(self, **kwargs):
|
||||||
def install_packages(*names):
|
def install_pakages(*names):
|
||||||
tasks = self.tasks.get(self.branch, kwargs["image"])
|
tasks = self.tasks.get(self.branch, kwargs["image"])
|
||||||
linux32 = '$([ "$(rpm --eval %_host_cpu)" = i586 ] && echo linux32)'
|
linux32 = '$([ "$(rpm --eval %_host_cpu)" = i586 ] && echo linux32)'
|
||||||
if tasks:
|
if tasks:
|
||||||
@ -273,7 +273,7 @@ class DockerBuilder:
|
|||||||
rendered = self.render_template(
|
rendered = self.render_template(
|
||||||
dockerfile_template.read_text(),
|
dockerfile_template.read_text(),
|
||||||
self.overwrite_organization,
|
self.overwrite_organization,
|
||||||
install_packages,
|
install_pakages,
|
||||||
)
|
)
|
||||||
kwargs["dockerfile"].write_text(rendered + "\n")
|
kwargs["dockerfile"].write_text(rendered + "\n")
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ class DockerBuilder:
|
|||||||
f"{from_image['organization']}/{from_image['name']}"
|
f"{from_image['organization']}/{from_image['name']}"
|
||||||
)
|
)
|
||||||
elif distrolessfile.exists():
|
elif distrolessfile.exists():
|
||||||
requires.add("base/distroless-builder")
|
requires.add("alt/distroless-builder")
|
||||||
raw_from = self.distrolesses[canonical_name].raw_from
|
raw_from = self.distrolesses[canonical_name].raw_from
|
||||||
from_ = self.render_template(raw_from, self.organization)
|
from_ = self.render_template(raw_from, self.organization)
|
||||||
if match := re.match(self.image_re, from_):
|
if match := re.match(self.image_re, from_):
|
||||||
@ -345,7 +345,7 @@ class DockerBuilder:
|
|||||||
def distroless_build(self, image: Image, arches):
|
def distroless_build(self, image: Image, arches):
|
||||||
def distroless_build_arch(arch, manifest):
|
def distroless_build_arch(arch, manifest):
|
||||||
distroless_builder = self.render_full_tag(
|
distroless_builder = self.render_full_tag(
|
||||||
Image("base/distroless-builder"), self.branch
|
Image("alt/distroless-builder"), self.branch
|
||||||
)
|
)
|
||||||
distroless = self.distrolesses[image.canonical_name]
|
distroless = self.distrolesses[image.canonical_name]
|
||||||
distroless.render_arch_branch(arch, self.branch)
|
distroless.render_arch_branch(arch, self.branch)
|
||||||
@ -638,8 +638,8 @@ class ImagesInfo:
|
|||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
stages = ["build", "remove_dockerfiles", "render_dockerfiles", "push"]
|
stages = ["build", "remove_dockerfiles", "render_dockerfiles", "push"]
|
||||||
arches = ["amd64", "386", "arm64"]
|
arches = ["amd64", "386", "arm64", "arm", "ppc64le"]
|
||||||
branches = ["p10", "sisyphus", "c10f1", "c10f2"]
|
branches = ["p9", "p10", "sisyphus"]
|
||||||
organizations = list(ORG_DIR.iterdir())
|
organizations = list(ORG_DIR.iterdir())
|
||||||
images = [f"{o.name}/{i.name}" for o in organizations for i in o.iterdir()]
|
images = [f"{o.name}/{i.name}" for o in organizations for i in o.iterdir()]
|
||||||
organizations = [o.name for o in organizations]
|
organizations = [o.name for o in organizations]
|
||||||
@ -654,8 +654,7 @@ def parse_args():
|
|||||||
nargs="+",
|
nargs="+",
|
||||||
default=images,
|
default=images,
|
||||||
choices=images,
|
choices=images,
|
||||||
metavar="IMAGE_NAME",
|
help="list of images",
|
||||||
help="list of images to build",
|
|
||||||
)
|
)
|
||||||
images_group.add_argument(
|
images_group.add_argument(
|
||||||
"-o",
|
"-o",
|
||||||
@ -665,18 +664,10 @@ def parse_args():
|
|||||||
choices=organizations,
|
choices=organizations,
|
||||||
help="build all images from these organizations",
|
help="build all images from these organizations",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
|
||||||
"--skip-images",
|
|
||||||
nargs="+",
|
|
||||||
default=[],
|
|
||||||
choices=images,
|
|
||||||
metavar="IMAGE_NAME",
|
|
||||||
help="list of images to skip",
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-r",
|
"-r",
|
||||||
"--registry",
|
"--registry",
|
||||||
default="gitea.basealt.ru",
|
default="gitea.basealt.ru/images_repo",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--overwrite-organization",
|
"--overwrite-organization",
|
||||||
@ -705,20 +696,27 @@ def parse_args():
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--sign",
|
"--sign",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--skip-images",
|
||||||
|
nargs="+",
|
||||||
|
default=[],
|
||||||
|
choices=images,
|
||||||
|
help="list of skipping images",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-a",
|
"-a",
|
||||||
"--arches",
|
"--arches",
|
||||||
nargs="+",
|
nargs="+",
|
||||||
default=arches,
|
default=arches,
|
||||||
choices=arches,
|
choices=arches,
|
||||||
help="build images for these architectures",
|
help="list of arches",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--skip-arches",
|
"--skip-arches",
|
||||||
nargs="+",
|
nargs="+",
|
||||||
default=[],
|
default=[],
|
||||||
choices=arches,
|
choices=arches,
|
||||||
help="list of architectures to skip",
|
help="list of skipping arches",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-b",
|
"-b",
|
||||||
@ -726,28 +724,28 @@ def parse_args():
|
|||||||
nargs="+",
|
nargs="+",
|
||||||
default=branches,
|
default=branches,
|
||||||
choices=branches,
|
choices=branches,
|
||||||
help="build images for these branches",
|
help="list of branches",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--skip-branches",
|
"--skip-branches",
|
||||||
nargs="+",
|
nargs="+",
|
||||||
default=[],
|
default=[],
|
||||||
choices=branches,
|
choices=branches,
|
||||||
help="list of branches to skip",
|
help="list of skipping branches",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--stages",
|
"--stages",
|
||||||
nargs="+",
|
nargs="+",
|
||||||
default=stages,
|
default=stages,
|
||||||
choices=stages,
|
choices=stages,
|
||||||
help="list of stages to go through",
|
help="list of stages",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--skip-stages",
|
"--skip-stages",
|
||||||
nargs="+",
|
nargs="+",
|
||||||
default=[],
|
default=[],
|
||||||
choices=stages,
|
choices=stages,
|
||||||
help="list of stages to skip",
|
help="list of skipping stages",
|
||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
9
org/alt/apache2/Dockerfile.template
Normal file
9
org/alt/apache2/Dockerfile.template
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages("apache2") }}
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/httpd2", "-D", "NO_DETACH", "-k", "start"]
|
1
org/alt/apache2/test
Normal file
1
org/alt/apache2/test
Normal file
@ -0,0 +1 @@
|
|||||||
|
apachectl -v
|
@ -2,6 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
{{ install_packages("glibc-gconv-modules", "glibc-locales", "tzdata") }}
|
{{ install_pakages("glibc-gconv-modules", "glibc-locales", "tzdata") }}
|
||||||
|
|
||||||
CMD ["bash"]
|
CMD ["bash"]
|
10
org/alt/buildpack-deps-curl/Dockerfile.template
Normal file
10
org/alt/buildpack-deps-curl/Dockerfile.template
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages(
|
||||||
|
"ca-certificates",
|
||||||
|
"curl",
|
||||||
|
"gnupg",
|
||||||
|
"wget"
|
||||||
|
) }}
|
12
org/alt/buildpack-deps-scm/Dockerfile.template
Normal file
12
org/alt/buildpack-deps-scm/Dockerfile.template
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM {{ registry }}{{ organization }}/buildpack-deps-curl:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
|
||||||
|
{{ install_pakages(
|
||||||
|
"git",
|
||||||
|
"mercurial",
|
||||||
|
"openssh-clients",
|
||||||
|
"procps",
|
||||||
|
"subversion"
|
||||||
|
) }}
|
@ -1,12 +1,8 @@
|
|||||||
FROM {{ registry }}base/buildpack-deps-scm:{{ branch }}
|
FROM {{ registry }}{{ organization }}/buildpack-deps-scm:{{ branch }}
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="buildpack-deps"
|
{{ install_pakages(
|
||||||
LABEL org.opencontainers.image.licenses="GPLv2"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages(
|
|
||||||
"ImageMagick",
|
"ImageMagick",
|
||||||
"autoconf",
|
"autoconf",
|
||||||
"automake",
|
"automake",
|
29
org/alt/devel/Dockerfile.template
Normal file
29
org/alt/devel/Dockerfile.template
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
FROM {{ registry }}{{ organization }}/base:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
# install editor
|
||||||
|
{{ install_pakages("vim-console") }}
|
||||||
|
|
||||||
|
# install debugging tools
|
||||||
|
{{ install_pakages("strace", "gdb") }}
|
||||||
|
|
||||||
|
# install document viewers
|
||||||
|
{{ install_pakages("man") }}
|
||||||
|
|
||||||
|
# install version control system
|
||||||
|
{{ install_pakages("git-core", "perl-Git") }}
|
||||||
|
|
||||||
|
# install network utils
|
||||||
|
{{ install_pakages("iproute2", "iputils", "wget", "curl") }}
|
||||||
|
|
||||||
|
# install file utils
|
||||||
|
{{ install_pakages("lsof", "ripgrep") }}
|
||||||
|
|
||||||
|
# install shell and completions
|
||||||
|
{{ install_pakages("zsh", "zsh-completions") }}
|
||||||
|
|
||||||
|
# install compilation utils
|
||||||
|
{{ install_pakages("make", "gcc", "gcc-c++") }}
|
||||||
|
|
||||||
|
CMD ["zsh"]
|
@ -1,4 +1,4 @@
|
|||||||
from = "{{ registry }}base/distroless-static:{{ branch }}"
|
from = "{{ registry }}{{ organization }}/distroless-static:{{ branch }}"
|
||||||
builder-install-packages = [
|
builder-install-packages = [
|
||||||
"glibc-core",
|
"glibc-core",
|
||||||
'{{if_branches(["p10"], "glibc-nss")}}',
|
'{{if_branches(["p10"], "glibc-nss")}}',
|
11
org/alt/distroless-builder/Dockerfile.template
Normal file
11
org/alt/distroless-builder/Dockerfile.template
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
RUN echo %_excludedocs 1 >> /etc/rpm/macros
|
||||||
|
RUN rpm -qalds | awk '/^normal/{print $2}' | xargs rm -rf
|
||||||
|
{{ install_pakages("python3", "glibc-utils", "apt-repo") }}
|
||||||
|
WORKDIR /usr/src/distroless
|
||||||
|
RUN mkdir file-lists
|
||||||
|
RUN useradd -m nonroot
|
||||||
|
COPY distroless-builder.py .
|
3
org/alt/distroless-builder/README.md
Normal file
3
org/alt/distroless-builder/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ALT dockerfile for distroless-builder image.
|
||||||
|
|
||||||
|
This images is using to build tarball for distroless images.
|
@ -1,4 +1,4 @@
|
|||||||
from = "{{ registry }}base/distroless-base:{{ branch }}"
|
from = "{{ registry }}{{ organization }}/distroless-base:{{ branch }}"
|
||||||
builder-install-packages = [
|
builder-install-packages = [
|
||||||
"coreutils",
|
"coreutils",
|
||||||
"findutils",
|
"findutils",
|
3
org/alt/distroless-gotop/distroless.toml
Normal file
3
org/alt/distroless-gotop/distroless.toml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from = "{{ registry }}{{ organization }}/distroless-base:{{ branch }}"
|
||||||
|
full-files = ["/usr/bin/gotop"]
|
||||||
|
entrypoint = ["/usr/bin/gotop"]
|
3
org/alt/distroless-true/distroless.toml
Normal file
3
org/alt/distroless-true/distroless.toml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from = "{{ registry }}{{ organization }}/distroless-static:{{ branch }}"
|
||||||
|
files = ["/bin/true"]
|
||||||
|
cmd = ["/bin/true"]
|
9
org/alt/etcd/Dockerfile.template
Normal file
9
org/alt/etcd/Dockerfile.template
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages("etcd") }}
|
||||||
|
|
||||||
|
VOLUME /data
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/sbin/etcd", "--data-dir", "/data"]
|
21
org/alt/gitea/Dockerfile.template
Normal file
21
org/alt/gitea/Dockerfile.template
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages("gitea", "openssh-server", "gosu") }}
|
||||||
|
|
||||||
|
ENV USER gitea
|
||||||
|
ENV HOME /var/lib/gitea
|
||||||
|
ENV GITEA_WORK_DIR /var/lib/gitea
|
||||||
|
|
||||||
|
WORKDIR /var/lib/gitea
|
||||||
|
|
||||||
|
COPY app.ini /etc/gitea/app.ini
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
EXPOSE 2222
|
||||||
|
|
||||||
|
VOLUME ["/var/lib/gitea"]
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
1
org/alt/gitea/test
Normal file
1
org/alt/gitea/test
Normal file
@ -0,0 +1 @@
|
|||||||
|
gitea --version
|
@ -2,13 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="nginx"
|
{{ install_pakages("nginx", "apache2-html", "tzdata") }}
|
||||||
LABEL org.opencontainers.image.description="Fast HTTP server, extremely useful as an Apache frontend"
|
|
||||||
LABEL org.opencontainers.image.source="https://nginx.org/"
|
|
||||||
LABEL org.opencontainers.image.licenses="BSD"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("nginx", "apache2-html", "tzdata") }}
|
|
||||||
|
|
||||||
RUN cd /etc/nginx/sites-enabled.d && ln -s ../sites-available.d/default.conf .
|
RUN cd /etc/nginx/sites-enabled.d && ln -s ../sites-available.d/default.conf .
|
||||||
|
|
12
org/alt/node/Dockerfile.template
Normal file
12
org/alt/node/Dockerfile.template
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM {{ registry }}{{ organization }}/buildpack-deps:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
RUN groupadd --gid 1000 node \
|
||||||
|
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
|
||||||
|
|
||||||
|
{{ install_pakages(
|
||||||
|
"node",
|
||||||
|
"npm",
|
||||||
|
"yarn"
|
||||||
|
) }}
|
11
org/alt/prometheus/Dockerfile.template
Normal file
11
org/alt/prometheus/Dockerfile.template
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages("prometheus") }}
|
||||||
|
|
||||||
|
WORKDIR /var/lib/prometheus
|
||||||
|
USER prometheus
|
||||||
|
EXPOSE 9090
|
||||||
|
VOLUME [ "/var/lib/prometheus" ]
|
||||||
|
ENTRYPOINT [ "/usr/bin/prometheus", "--config.file=/etc/prometheus/prometheus.yml"]
|
12
org/alt/python/Dockerfile.template
Normal file
12
org/alt/python/Dockerfile.template
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM {{ registry }}{{ organization }}/base:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages(
|
||||||
|
"python3-module-pip",
|
||||||
|
"python3-module-setuptools",
|
||||||
|
"python3-dev",
|
||||||
|
"gcc",
|
||||||
|
) }}
|
||||||
|
|
||||||
|
CMD ["python3"]
|
1
org/alt/python/test
Normal file
1
org/alt/python/test
Normal file
@ -0,0 +1 @@
|
|||||||
|
python3 --help
|
15
org/alt/registry/Dockerfile.template
Normal file
15
org/alt/registry/Dockerfile.template
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages("docker-registry") }}
|
||||||
|
|
||||||
|
RUN ln -sf /usr/bin/docker-registry /bin/registry
|
||||||
|
|
||||||
|
VOLUME ["/var/lib/registry"]
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD ["/etc/docker-registry/config.yml"]
|
7
org/alt/ruby/Dockerfile.template
Normal file
7
org/alt/ruby/Dockerfile.template
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages("irb") }}
|
||||||
|
|
||||||
|
CMD ["irb"]
|
@ -1,16 +1,10 @@
|
|||||||
FROM {{ registry }}base/base:{{ branch }}
|
FROM {{ registry }}{{ organization }}/base:{{ branch }}
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="systemd"
|
|
||||||
LABEL org.opencontainers.image.description="System and Session Manager"
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/systemd/systemd"
|
|
||||||
LABEL org.opencontainers.image.licenses="LGPLv2.1+"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
ENV container docker
|
ENV container docker
|
||||||
|
|
||||||
{{ install_packages("systemd-sysvinit") }}
|
{{ install_pakages("systemd-sysvinit") }}
|
||||||
|
|
||||||
RUN ( \
|
RUN ( \
|
||||||
cd /lib/systemd/system/sysinit.target.wants/; \
|
cd /lib/systemd/system/sysinit.target.wants/; \
|
@ -2,12 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="unit"
|
|
||||||
LABEL org.opencontainers.image.description="NGINX Unit is a lightweight and versatile web-server"
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y unit curl tzdata; \
|
apt-get install -y unit curl tzdata; \
|
||||||
rm -f /var/cache/apt/archives/*.rpm \
|
rm -f /var/cache/apt/archives/*.rpm \
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "LC_ALL=ru_RU.UTF-8 TZ=/usr/share/zoneinfo/Europe/Moscow date| grep MSK"
|
|
@ -1,14 +0,0 @@
|
|||||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="buildpack-deps-curl"
|
|
||||||
LABEL org.opencontainers.image.licenses="GPLv2"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages(
|
|
||||||
"ca-certificates",
|
|
||||||
"curl",
|
|
||||||
"gnupg",
|
|
||||||
"wget"
|
|
||||||
) }}
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "curl --version && gpg --version"
|
|
@ -1,15 +0,0 @@
|
|||||||
FROM {{ registry }}base/buildpack-deps-curl:{{ branch }}
|
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="buildpack-deps-scm"
|
|
||||||
LABEL org.opencontainers.image.licenses="GPLv2"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages(
|
|
||||||
"git",
|
|
||||||
"mercurial",
|
|
||||||
"openssh-clients",
|
|
||||||
"procps",
|
|
||||||
"subversion"
|
|
||||||
) }}
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "git --version && hg --version"
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "gcc --version && make --version"
|
|
@ -1,34 +0,0 @@
|
|||||||
FROM {{ registry }}base/base:{{ branch }}
|
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="devel"
|
|
||||||
LABEL org.opencontainers.image.description="This image is only for devel or testing purposes"
|
|
||||||
LABEL org.opencontainers.image.licenses="GPLv2"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
# install editor
|
|
||||||
{{ install_packages("vim-console") }}
|
|
||||||
|
|
||||||
# install debugging tools
|
|
||||||
{{ install_packages("strace", "gdb") }}
|
|
||||||
|
|
||||||
# install document viewers
|
|
||||||
{{ install_packages("man") }}
|
|
||||||
|
|
||||||
# install version control system
|
|
||||||
{{ install_packages("git-core", "perl-Git") }}
|
|
||||||
|
|
||||||
# install network utils
|
|
||||||
{{ install_packages("iproute2", "iputils", "wget", "curl") }}
|
|
||||||
|
|
||||||
# install file utils
|
|
||||||
{{ install_packages("lsof", "ripgrep") }}
|
|
||||||
|
|
||||||
# install shell and completions
|
|
||||||
{{ install_packages("zsh", "zsh-completions") }}
|
|
||||||
|
|
||||||
# install compilation utils
|
|
||||||
{{ install_packages("make", "gcc", "gcc-c++") }}
|
|
||||||
|
|
||||||
CMD ["zsh"]
|
|
@ -1 +0,0 @@
|
|||||||
man --version && ip -V && vim --version | grep vim
|
|
@ -1,16 +0,0 @@
|
|||||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="distroless-builder"
|
|
||||||
LABEL org.opencontainers.image.description="This image is used to build tarballs for distroless images"
|
|
||||||
LABEL org.opencontainers.image.licenses="GPLv2"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
RUN echo %_excludedocs 1 >> /etc/rpm/macros
|
|
||||||
RUN rpm -qalds | awk '/^normal/{print $2}' | xargs rm -rf
|
|
||||||
{{ install_packages("python3", "glibc-utils", "apt-repo") }}
|
|
||||||
WORKDIR /usr/src/distroless
|
|
||||||
RUN mkdir file-lists
|
|
||||||
RUN useradd -m nonroot
|
|
||||||
COPY distroless-builder.py .
|
|
@ -1,3 +0,0 @@
|
|||||||
ALT dockerfile for distroless-builder image.
|
|
||||||
|
|
||||||
This image is used to build tarballs for distroless images.
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "apt-repo --version"
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "ss -V"
|
|
@ -1,3 +0,0 @@
|
|||||||
from = "{{ registry }}base/distroless-base:{{ branch }}"
|
|
||||||
full-files = ["/usr/bin/gotop"]
|
|
||||||
entrypoint = ["/usr/bin/gotop"]
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: ""
|
|
||||||
command: "--version"
|
|
@ -1,3 +0,0 @@
|
|||||||
from = "{{ registry }}base/distroless-static:{{ branch }}"
|
|
||||||
files = ["/bin/true"]
|
|
||||||
cmd = ["/bin/true"]
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: ""
|
|
||||||
command: "true"
|
|
@ -1,13 +0,0 @@
|
|||||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="trivy"
|
|
||||||
LABEL org.opencontainers.image.description="A Fast Vulnerability Scanner for Containers"
|
|
||||||
LABEL org.opencontainers.image.source="https://aquasecurity.github.io/trivy"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("trivy") }}
|
|
||||||
|
|
||||||
ENTRYPOINT [ "trivy" ]
|
|
@ -1,10 +0,0 @@
|
|||||||
dockerfiles-alt-trivy
|
|
||||||
=====================
|
|
||||||
|
|
||||||
ALT dockerfile for trivy.
|
|
||||||
|
|
||||||
Copy dockerfile somewhere and built the image:
|
|
||||||
`$ docker build --rm -t <username>/trivy .`
|
|
||||||
|
|
||||||
And launch the trivy container
|
|
||||||
`$ docker run -it <username>/trivy`
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "trivy --version"
|
|
@ -1,17 +0,0 @@
|
|||||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="cert-manager-cainjector"
|
|
||||||
LABEL org.opencontainers.image.description="Cainjector component for automatic provisioning and managing TLS certificates in Kubernetes"
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("cert-manager") }}
|
|
||||||
|
|
||||||
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
|
|
||||||
|
|
||||||
USER 1000
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/cainjector"]
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "cainjector --help"
|
|
@ -1,17 +0,0 @@
|
|||||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="cert-manager-controller"
|
|
||||||
LABEL org.opencontainers.image.description="Controller component for automatic provisioning and managing TLS certificates in Kubernetes"
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("cert-manager") }}
|
|
||||||
|
|
||||||
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
|
|
||||||
|
|
||||||
USER 1000
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/controller"]
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "controller --help"
|
|
@ -1,17 +0,0 @@
|
|||||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="cert-manager-webhook"
|
|
||||||
LABEL org.opencontainers.image.description="Webhook component for automatic provisioning and managing TLS certificates in Kubernetes"
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/cert-manager/cert-manager"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("cert-manager") }}
|
|
||||||
|
|
||||||
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
|
|
||||||
|
|
||||||
USER 1000
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/webhook"]
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "webhook --help"
|
|
@ -1,13 +0,0 @@
|
|||||||
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|
||||||
|
|
||||||
MAINTAINER alt-cloud
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="flannel-cni-plugin"
|
|
||||||
LABEL org.opencontainers.image.description="CNI network plugin that is powered by flannel"
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/flannel-io/cni-plugin"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("cni-plugin-flannel") }}
|
|
||||||
|
|
||||||
RUN cp /usr/libexec/cni/flannel /flannel
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: ""
|
|
||||||
command: "flannel"
|
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "flanneld --version"
|
|
11
org/k8s/cert-manager-cainjector/Dockerfile.template
Normal file
11
org/k8s/cert-manager-cainjector/Dockerfile.template
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages("cert-manager") }}
|
||||||
|
|
||||||
|
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
|
||||||
|
|
||||||
|
USER 1000
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/cainjector"]
|
11
org/k8s/cert-manager-controller/Dockerfile.template
Normal file
11
org/k8s/cert-manager-controller/Dockerfile.template
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages("cert-manager") }}
|
||||||
|
|
||||||
|
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
|
||||||
|
|
||||||
|
USER 1000
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/controller"]
|
11
org/k8s/cert-manager-webhook/Dockerfile.template
Normal file
11
org/k8s/cert-manager-webhook/Dockerfile.template
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages("cert-manager") }}
|
||||||
|
|
||||||
|
RUN groupadd -r -g 1000 cert-manger && useradd --no-log-init -r -u 1000 -g cert-manger cert-manger
|
||||||
|
|
||||||
|
USER 1000
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/webhook"]
|
@ -2,12 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="coredns"
|
{{ install_pakages("coredns") }}
|
||||||
LABEL org.opencontainers.image.description="CoreDNS is a DNS server that chains plugins"
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/coredns/coredns"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("coredns") }}
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/coredns"]
|
ENTRYPOINT ["/usr/bin/coredns"]
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "coredns --version"
|
|
@ -2,13 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="etcd"
|
{{ install_pakages("etcd") }}
|
||||||
LABEL org.opencontainers.image.description="Distributed reliable key-value store for the most critical data of a distributed system"
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/etcd-io/etcd"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("etcd") }}
|
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "etcd --version"
|
|
7
org/k8s/flannel-cni-plugin/Dockerfile.template
Normal file
7
org/k8s/flannel-cni-plugin/Dockerfile.template
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
||||||
|
|
||||||
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
|
{{ install_pakages("cni-plugin-flannel") }}
|
||||||
|
|
||||||
|
RUN cp /usr/libexec/cni/flannel /flannel
|
@ -2,13 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="flannel"
|
{{ install_pakages(
|
||||||
LABEL org.opencontainers.image.description="Network fabric for containers"
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/flannel-io/flannel"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages(
|
|
||||||
"iproute2",
|
"iproute2",
|
||||||
"net-tools",
|
"net-tools",
|
||||||
"ca-certificates",
|
"ca-certificates",
|
@ -2,12 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="kube-apiserver"
|
{{ install_pakages("kubernetes-master") }}
|
||||||
LABEL org.opencontainers.image.description="The Kubernetes API server validates and configures data for the api objects which include pods, services, replicationcontrollers, and others."
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("kubernetes-master") }}
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/kube-apiserver"]
|
ENTRYPOINT ["/usr/bin/kube-apiserver"]
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "kube-apiserver --version"
|
|
@ -2,12 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="kube-controller-manager"
|
{{ install_pakages("kubernetes-master") }}
|
||||||
LABEL org.opencontainers.image.description="The Kubernetes controller manager is a daemon that embeds the core control loops shipped with Kubernetes."
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("kubernetes-master") }}
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/kube-controller-manager"]
|
ENTRYPOINT ["/usr/bin/kube-controller-manager"]
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
entrypoint: "/bin/sh"
|
|
||||||
command: "kube-controller-manager --version"
|
|
@ -2,13 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
|
|||||||
|
|
||||||
MAINTAINER alt-cloud
|
MAINTAINER alt-cloud
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="kube-proxy"
|
{{ install_pakages("kubernetes-node") }}
|
||||||
LABEL org.opencontainers.image.description="The Kubernetes network proxy runs on each node."
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/kubernetes/kubernetes"
|
|
||||||
LABEL org.opencontainers.image.licenses="Apache-2.0"
|
|
||||||
LABEL org.opencontainers.image.vendor="ALT Linux Team"
|
|
||||||
|
|
||||||
{{ install_packages("kubernetes-node") }}
|
|
||||||
|
|
||||||
RUN ln -s /usr/bin/kube-proxy /usr/local/bin/kube-proxy
|
RUN ln -s /usr/bin/kube-proxy /usr/local/bin/kube-proxy
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user