@@ -446,7 +446,8 @@ pipeline {
446
446
}
447
447
steps {
448
448
echo " Running on node: ${ NODE_NAME} "
449
- sh " docker build \
449
+ sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile"
450
+ sh " docker buildx build \
450
451
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
451
452
--label \" org.opencontainers.image.authors=linuxserver.io\" \
452
453
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-mariadb/packages\" \
@@ -459,7 +460,7 @@ pipeline {
459
460
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
460
461
--label \" org.opencontainers.image.title=Mariadb\" \
461
462
--label \" org.opencontainers.image.description=[Mariadb](https://mariadb.org/) is one of the most popular database servers. Made by the original developers of MySQL.\" \
462
- --no-cache --pull -t ${ IMAGE} :${ META_TAG} \
463
+ --no-cache --pull -t ${ IMAGE} :${ META_TAG} --platform=linux/amd64 \
463
464
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
464
465
}
465
466
}
@@ -476,7 +477,8 @@ pipeline {
476
477
stage(' Build X86' ) {
477
478
steps {
478
479
echo " Running on node: ${ NODE_NAME} "
479
- sh " docker build \
480
+ sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile"
481
+ sh " docker buildx build \
480
482
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
481
483
--label \" org.opencontainers.image.authors=linuxserver.io\" \
482
484
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-mariadb/packages\" \
@@ -489,7 +491,7 @@ pipeline {
489
491
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
490
492
--label \" org.opencontainers.image.title=Mariadb\" \
491
493
--label \" org.opencontainers.image.description=[Mariadb](https://mariadb.org/) is one of the most popular database servers. Made by the original developers of MySQL.\" \
492
- --no-cache --pull -t ${ IMAGE} :amd64-${ META_TAG} \
494
+ --no-cache --pull -t ${ IMAGE} :amd64-${ META_TAG} --platform=linux/amd64 \
493
495
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
494
496
}
495
497
}
@@ -503,7 +505,8 @@ pipeline {
503
505
sh ''' #! /bin/bash
504
506
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
505
507
'''
506
- sh " docker build \
508
+ sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile.armhf"
509
+ sh " docker buildx build \
507
510
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
508
511
--label \" org.opencontainers.image.authors=linuxserver.io\" \
509
512
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-mariadb/packages\" \
@@ -516,7 +519,7 @@ pipeline {
516
519
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
517
520
--label \" org.opencontainers.image.title=Mariadb\" \
518
521
--label \" org.opencontainers.image.description=[Mariadb](https://mariadb.org/) is one of the most popular database servers. Made by the original developers of MySQL.\" \
519
- --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} \
522
+ --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} --platform=linux/arm/v7 \
520
523
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
521
524
sh " docker tag ${ IMAGE} :arm32v7-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${ COMMIT_SHA} -${ BUILD_NUMBER} "
522
525
retry(5 ) {
@@ -537,7 +540,8 @@ pipeline {
537
540
sh ''' #! /bin/bash
538
541
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
539
542
'''
540
- sh " docker build \
543
+ sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64"
544
+ sh " docker buildx build \
541
545
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
542
546
--label \" org.opencontainers.image.authors=linuxserver.io\" \
543
547
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-mariadb/packages\" \
@@ -550,7 +554,7 @@ pipeline {
550
554
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
551
555
--label \" org.opencontainers.image.title=Mariadb\" \
552
556
--label \" org.opencontainers.image.description=[Mariadb](https://mariadb.org/) is one of the most popular database servers. Made by the original developers of MySQL.\" \
553
- --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} \
557
+ --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} --platform=linux/arm64 \
554
558
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
555
559
sh " docker tag ${ IMAGE} :arm64v8-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${ COMMIT_SHA} -${ BUILD_NUMBER} "
556
560
retry(5 ) {
@@ -579,26 +583,12 @@ pipeline {
579
583
else
580
584
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
581
585
fi
582
- if [ "${DIST_IMAGE}" == "alpine" ]; then
583
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
584
- apk info -v > /tmp/package_versions.txt && \
585
- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
586
- chmod 777 /tmp/package_versions.txt'
587
- elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
588
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
589
- apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
590
- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
591
- chmod 777 /tmp/package_versions.txt'
592
- elif [ "${DIST_IMAGE}" == "fedora" ]; then
593
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
594
- rpm -qa > /tmp/package_versions.txt && \
595
- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
596
- chmod 777 /tmp/package_versions.txt'
597
- elif [ "${DIST_IMAGE}" == "arch" ]; then
598
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
599
- pacman -Q > /tmp/package_versions.txt && \
600
- chmod 777 /tmp/package_versions.txt'
601
- fi
586
+ touch ${TEMPDIR}/package_versions.txt
587
+ docker run --rm \
588
+ -v /var/run/docker.sock:/var/run/docker.sock:ro \
589
+ -v ${TEMPDIR}:/tmp \
590
+ ghcr.io/anchore/syft:latest \
591
+ ${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
602
592
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
603
593
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
604
594
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
0 commit comments