5 Commits

Author SHA1 Message Date
90ff275009 Обновить .gitea/workflows/wf_test.yaml
All checks were successful
Test job / test-job (push) Successful in 18s
2024-04-19 18:55:48 +03:00
3cb889958f Обновить .gitea/workflows/wf_test.yaml
All checks were successful
Test job / test-job (push) Successful in 18s
2024-04-19 18:53:21 +03:00
eda31085fb Обновить .gitea/workflows/wf_test.yaml 2024-04-19 18:51:51 +03:00
9978a86d47 Обновить .gitea/workflows/wf_test.yaml
All checks were successful
Test job / test-job (push) Successful in 19s
2024-04-19 18:47:29 +03:00
3afd8bc54e Обновить .gitea/workflows/wf_test.yaml
All checks were successful
Test job / test-job (push) Successful in 18s
2024-04-19 18:41:42 +03:00
137 changed files with 349 additions and 652 deletions

View File

@ -6,70 +6,53 @@
#$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"}
errors=''
haserr=false
for IM in $(ls $WS/org/$ORG/ | xargs)
for IM in $(ls $5/org/$2/ | xargs)
do
echo "image=$IM"
imgpath="$REPO/$WS/$BR/$IM:$BR"
command=''
testpath="$WS/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
if test -f $5/org/$2/$IM/test
then
test=$(cat $5/org/$2/$IM/test)
else test=''
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"
echo "test script=$test"
imgpath="$2/$IM:$1"
if [[ $2 == 'k8s' ]]
then imgpath="$2-$1/$IM:latest"
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
then tag=$(date +"%Y%m%d")
fi
if [[ $tag != '' ]]
then
skopeo copy -a docker://$URL/$imgpath:$BR docker://$URL/$imgpath:$tag
scopeo delete docker://$URL/$imgpath:$BR
echo "tag is updated"
else echo "new tag is empty and is not sent to repository"
fi
command="echo empty_command"
if [[ $test != '' ]]; then
command="podman run --rm --entrypoint=\"/bin/sh\" $3/$4/$imgpath -c \"$test\""
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"
if [[ $IM = 'distroless-true' ]]; then
command="podman run --rm $3/$4/$imgpath \"true\""
fi
if [[ $IM = 'distroless-gotop' ]]; then
command="podman run --rm $3/$4/$imgpath \"--version\""
fi
if [[ $IM = 'flannel-cni-plugin' ]]; then
command="podman run --rm $3/$4/$imgpath \"/flannel\""
fi
if [[ $IM = 'pause' ]]; then
command="podman run --rm $3/$4/$imgpath \"/pause\" \"-v\""
fi
fi
echo $command
eval $command 2>$IM.log || haserr=true
echo "podman rmi --all"
podman rmi --all
if [ "$haserr" = true ]
then
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
haserr=false
done

View File

@ -2,10 +2,7 @@ name: Full building alt images
on:
push:
tags:
- '*_*'
tags-ignore:
- '*_k8s'
- 'sisyphus_*'
- '*10*_*'
jobs:
build-process:
@ -24,25 +21,22 @@ jobs:
echo $repourl
reponame=$(echo $GR | cut -d '/' -f 1)
echo "REPO=$reponame" >> ${GITHUB_ENV}
echo $reponame
echo $reponame
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 python3-module-tomli python3-module-jinja2 podman buildah jq curl apt-repo"
apt-get install -y python3-module-tomli python3-module-jinja2 podman buildah jq curl apt-repo
#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
echo "apt-repo add 345290 && apt-get update"
apt-repo add 345290 && apt-get update
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
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
@ -53,20 +47,23 @@ jobs:
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"
echo "ORG=$org"
- name: Login podman gitea
run: |
echo "podman login ${{ env.URL }}"
podman login --username $P_USER --password $P_PASS ${{ 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
- name: Run building script
id: build-script
run: |
build_args="-b $BR -o $ORG --skip-images base/distroless-devel --overwrite-organization $BR --registry $URL/${{ gitea.workspace }}/$BR"
build_args="-b $BR -o $ORG"
#-o $ORG --skip-images alt/distroless-devel
if [[ $BR == 'sisyphus' ]]; then build_args="$build_args --skip-arches arm"; fi
if [[ $ORG == 'k8s' ]]; then build_args="$build_args --tags tags.toml --overwrite-organization $ORG-$BR"; fi
echo "build.py $build_args"
${{ gitea.workspace }}/build.py $build_args
${{ gitea.workspace }}/build.py $build_args
env:
ORG: ${{ env.ORG }}
BR: ${{ env.BRANCH }}
@ -74,10 +71,12 @@ jobs:
- 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"
issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/gitea-image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r)
if [[ $issueid != '' ]]; then \
body="Building images finish with some 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"; \
else echo "no issue to send notification"; fi
env:
T: ${{ secrets.TOKEN }}
BR: ${{ env.BRANCH }}
@ -86,8 +85,8 @@ jobs:
- 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"
curl -X 'DELETE' "$URL/api/v1/repos/$REPO/gitea-image-forge/tags/$tagname?token=$T" -H 'accept: application/json' -s
echo "tag $tagname is deleted"
env:
T: ${{ secrets.TOKEN }}
BR: ${{ env.BRANCH }}
@ -103,24 +102,17 @@ jobs:
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 jq curl
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: Login podman gitea
run: |
echo "podman login ${{ env.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
- 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"
echo "test process finished"
env:
BR: ${{ needs.build-process.outputs.branch }}
ORG: ${{ needs.build-process.outputs.org }}
@ -130,11 +122,13 @@ jobs:
- 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"
issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/gitea-image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r)
if [[ $issueid != '' ]]; then \
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"; \
else echo "no issue to send notification"; fi
env:
T: ${{ secrets.TOKEN }}
BR: ${{ needs.build-process.outputs.branch }}

View File

@ -54,7 +54,9 @@ jobs:
- name: Run building script
id: build-script
run: |
build_args="-b $BR -o $ORG --skip-images alt/distroless-devel"
build_args="-b $BR -o $ORG"
#-o $ORG --skip-images alt/distroless-devel
if [[ $BR == 'sisyphus' ]]; then build_args="$build_args --skip-arches arm"; fi
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
@ -65,10 +67,12 @@ jobs:
- 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"
issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/gitea-image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r)
if [[ $issueid != '' ]]; then \
body="Building images finish with some 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"; \
else echo "no issue to send notification"; fi
env:
T: ${{ secrets.TOKEN }}
BR: ${{ env.BRANCH }}
@ -77,7 +81,7 @@ jobs:
- 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
curl -X 'DELETE' "$URL/api/v1/repos/$REPO/gitea-image-forge/tags/$tagname?token=$T" -H 'accept: application/json' -s
echo "tag $tagname is deleted"
env:
T: ${{ secrets.TOKEN }}
@ -114,11 +118,13 @@ jobs:
- 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"
issueid=$(curl -X 'GET' "$URL/api/v1/repos/$REPO/gitea-image-forge/issues?state=open&labels=building&type=issues&page=1&limit=1&token=$T" -H 'accept: application/json' -s | jq '.[].number' -r)
if [[ $issueid != '' ]]; then \
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"; \
else echo "no issue to send notification"; fi
env:
T: ${{ secrets.TOKEN }}
BR: ${{ needs.build-process.outputs.branch }}

View File

@ -11,13 +11,11 @@ jobs:
- name: Parse target branch
run: |
echo $EV
echo ${{ github.action_path }}
echo ${{ github.action_ref }}
echo ${{ github.event }}
echo ${{ github.event_name }}
echo ${{ github.event_path }}
echo ${{ github.triggering_actor }}
echo ${{ github.workspace }}
echo ${{ github.ref_name }}
echo $RE
echo $RE2
echo $BR
env:
EV: ${{ toJson(gitea.event) }}
EV: ${{ toJson(gitea.event) }}
RE: ${{ github.ref_name }}
RE2: ${{ github.ref }}
BR: ${{ github.head_ref }}

View File

@ -225,7 +225,7 @@ class DockerBuilder:
self,
template: str,
organization: str,
install_packages=None,
install_pakages=None,
**kwargs,
) -> str:
if self.registry:
@ -237,7 +237,7 @@ class DockerBuilder:
rendered = Template(template).render(
alt_image=alt_image,
branch=self.branch,
install_packages=install_packages,
install_pakages=install_pakages,
organization=organization,
registry=registry,
**kwargs,
@ -247,7 +247,7 @@ class DockerBuilder:
@forall_images(consume_result=True)
def render_dockerfiles(self, **kwargs):
def install_packages(*names):
def install_pakages(*names):
tasks = self.tasks.get(self.branch, kwargs["image"])
linux32 = '$([ "$(rpm --eval %_host_cpu)" = i586 ] && echo linux32)'
if tasks:
@ -273,7 +273,7 @@ class DockerBuilder:
rendered = self.render_template(
dockerfile_template.read_text(),
self.overwrite_organization,
install_packages,
install_pakages,
)
kwargs["dockerfile"].write_text(rendered + "\n")
@ -638,8 +638,8 @@ class ImagesInfo:
def parse_args():
stages = ["build", "remove_dockerfiles", "render_dockerfiles", "push"]
arches = ["amd64", "386", "arm64"]
branches = ["p10", "sisyphus", "c10f1", "c10f2"]
arches = ["amd64", "386", "arm64", "arm", "ppc64le"]
branches = ["p9", "p10", "sisyphus"]
organizations = list(ORG_DIR.iterdir())
images = [f"{o.name}/{i.name}" for o in organizations for i in o.iterdir()]
organizations = [o.name for o in organizations]
@ -654,8 +654,7 @@ def parse_args():
nargs="+",
default=images,
choices=images,
metavar="IMAGE_NAME",
help="list of images to build",
help="list of images",
)
images_group.add_argument(
"-o",
@ -665,18 +664,10 @@ def parse_args():
choices=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(
"-r",
"--registry",
default="gitea.basealt.ru",
default="gitea.basealt.ru/images_repo",
)
parser.add_argument(
"--overwrite-organization",
@ -705,20 +696,27 @@ def parse_args():
parser.add_argument(
"--sign",
)
parser.add_argument(
"--skip-images",
nargs="+",
default=[],
choices=images,
help="list of skipping images",
)
parser.add_argument(
"-a",
"--arches",
nargs="+",
default=arches,
choices=arches,
help="build images for these architectures",
help="list of arches",
)
parser.add_argument(
"--skip-arches",
nargs="+",
default=[],
choices=arches,
help="list of architectures to skip",
help="list of skipping arches",
)
parser.add_argument(
"-b",
@ -726,28 +724,28 @@ def parse_args():
nargs="+",
default=branches,
choices=branches,
help="build images for these branches",
help="list of branches",
)
parser.add_argument(
"--skip-branches",
nargs="+",
default=[],
choices=branches,
help="list of branches to skip",
help="list of skipping branches",
)
parser.add_argument(
"--stages",
nargs="+",
default=stages,
choices=stages,
help="list of stages to go through",
help="list of stages",
)
parser.add_argument(
"--skip-stages",
nargs="+",
default=[],
choices=stages,
help="list of stages to skip",
help="list of skipping stages",
)
args = parser.parse_args()

View 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
View File

@ -0,0 +1 @@
apachectl -v

View File

@ -2,6 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_packages("glibc-gconv-modules", "glibc-locales", "tzdata") }}
{{ install_pakages("glibc-gconv-modules", "glibc-locales", "tzdata") }}
CMD ["bash"]

1
org/alt/base/test Normal file
View File

@ -0,0 +1 @@
LC_ALL=ru_RU.UTF-8 TZ=/usr/share/zoneinfo/Europe/Moscow date| grep MSK

View File

@ -0,0 +1,10 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages(
"ca-certificates",
"curl",
"gnupg",
"wget"
) }}

View File

@ -0,0 +1 @@
curl --version;gpg --version

View File

@ -2,11 +2,8 @@ FROM {{ registry }}{{ organization }}/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(
{{ install_pakages(
"git",
"mercurial",
"openssh-clients",

View File

@ -0,0 +1 @@
git --version;hg --version

View File

@ -2,11 +2,7 @@ FROM {{ registry }}{{ organization }}/buildpack-deps-scm:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="buildpack-deps"
LABEL org.opencontainers.image.licenses="GPLv2"
LABEL org.opencontainers.image.vendor="ALT Linux Team"
{{ install_packages(
{{ install_pakages(
"ImageMagick",
"autoconf",
"automake",

View File

@ -0,0 +1 @@
gcc --version;make --version

View 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
org/alt/devel/test Normal file
View File

@ -0,0 +1 @@
man --version;ip -V;vim --version | grep vim

View 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 .

View File

@ -0,0 +1,3 @@
ALT dockerfile for distroless-builder image.
This images is using to build tarball for distroless images.

View File

@ -0,0 +1 @@
apt-repo --version

View File

@ -0,0 +1 @@
ss -V

View 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"]

1
org/alt/etcd/test Normal file
View File

@ -0,0 +1 @@
etcdctl version

View 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
View File

@ -0,0 +1 @@
gitea --version

View File

@ -2,13 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="nginx"
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") }}
{{ install_pakages("nginx", "apache2-html", "tzdata") }}
RUN cd /etc/nginx/sites-enabled.d && ln -s ../sites-available.d/default.conf .

1
org/alt/nginx/test Normal file
View File

@ -0,0 +1 @@
nginx -v

View 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"
) }}

1
org/alt/node/test Normal file
View File

@ -0,0 +1 @@
node -v

View 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"]

1
org/alt/prometheus/test Normal file
View File

@ -0,0 +1 @@
prometheus --version

View 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
View File

@ -0,0 +1 @@
python3 --version

View 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"]

1
org/alt/registry/test Normal file
View File

@ -0,0 +1 @@
registry --version

View File

@ -0,0 +1,7 @@
FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
{{ install_pakages("irb") }}
CMD ["irb"]

1
org/alt/ruby/test Normal file
View File

@ -0,0 +1 @@
ruby --version

View File

@ -2,15 +2,9 @@ FROM {{ registry }}{{ organization }}/base:{{ branch }}
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
{{ install_packages("systemd-sysvinit") }}
{{ install_pakages("systemd-sysvinit") }}
RUN ( \
cd /lib/systemd/system/sysinit.target.wants/; \

1
org/alt/systemd/test Normal file
View File

@ -0,0 +1 @@
ls -la /sbin/init | grep systemd

View File

@ -2,12 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
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 && \
apt-get install -y unit curl tzdata; \
rm -f /var/cache/apt/archives/*.rpm \

1
org/alt/unit/test Normal file
View File

@ -0,0 +1 @@
unitd --version

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "LC_ALL=ru_RU.UTF-8 TZ=/usr/share/zoneinfo/Europe/Moscow date| grep MSK"

View File

@ -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"
) }}

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "curl --version && gpg --version"

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "git --version && hg --version"

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "gcc --version && make --version"

View File

@ -1,34 +0,0 @@
FROM {{ registry }}{{ organization }}/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"]

View File

@ -1 +0,0 @@
man --version && ip -V && vim --version | grep vim

View File

@ -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 .

View File

@ -1,3 +0,0 @@
ALT dockerfile for distroless-builder image.
This image is used to build tarballs for distroless images.

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "apt-repo --version"

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "ss -V"

View File

@ -1,2 +0,0 @@
entrypoint: ""
command: "--version"

View File

@ -1,2 +0,0 @@
entrypoint: ""
command: "true"

View File

@ -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" ]

View File

@ -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`

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "trivy --version"

View File

@ -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"]

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "cainjector --help"

View File

@ -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"]

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "controller --help"

View File

@ -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"]

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "webhook --help"

View File

@ -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

View File

@ -1,2 +0,0 @@
entrypoint: ""
command: "flannel"

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "flanneld --version"

View 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"]

View 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"]

View 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"]

View File

@ -2,12 +2,6 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="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") }}
{{ install_pakages("coredns") }}
ENTRYPOINT ["/usr/bin/coredns"]

View File

@ -1,2 +0,0 @@
entrypoint: "/bin/sh"
command: "coredns --version"

View File

@ -2,13 +2,7 @@ FROM {{ registry }}{{ alt_image }}:{{ branch }}
MAINTAINER alt-cloud
LABEL org.opencontainers.image.title="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") }}
{{ install_pakages("etcd") }}
VOLUME /data

Some files were not shown because too many files have changed in this diff Show More