@@ -440,7 +440,8 @@ pipeline {
440440 }
441441 steps {
442442 echo " Running on node: ${ NODE_NAME} "
443- sh " docker build \
443+ sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile"
444+ sh " docker buildx build \
444445 --label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
445446 --label \" org.opencontainers.image.authors=linuxserver.io\" \
446447 --label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-duckdns/packages\" \
@@ -453,7 +454,7 @@ pipeline {
453454 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
454455 --label \" org.opencontainers.image.title=Duckdns\" \
455456 --label \" org.opencontainers.image.description=[Duckdns](https://duckdns.org/) is a free service which will point a DNS (sub domains of duckdns.org) to an IP of your choice. The service is completely free, and doesn't require reactivation or forum posts to maintain its existence.\" \
456- --no-cache --pull -t ${ IMAGE} :${ META_TAG} \
457+ --no-cache --pull -t ${ IMAGE} :${ META_TAG} --platform=linux/amd64 \
457458 --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
458459 }
459460 }
@@ -470,7 +471,8 @@ pipeline {
470471 stage(' Build X86' ) {
471472 steps {
472473 echo " Running on node: ${ NODE_NAME} "
473- sh " docker build \
474+ sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile"
475+ sh " docker buildx build \
474476 --label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
475477 --label \" org.opencontainers.image.authors=linuxserver.io\" \
476478 --label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-duckdns/packages\" \
@@ -483,7 +485,7 @@ pipeline {
483485 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
484486 --label \" org.opencontainers.image.title=Duckdns\" \
485487 --label \" org.opencontainers.image.description=[Duckdns](https://duckdns.org/) is a free service which will point a DNS (sub domains of duckdns.org) to an IP of your choice. The service is completely free, and doesn't require reactivation or forum posts to maintain its existence.\" \
486- --no-cache --pull -t ${ IMAGE} :amd64-${ META_TAG} \
488+ --no-cache --pull -t ${ IMAGE} :amd64-${ META_TAG} --platform=linux/amd64 \
487489 --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
488490 }
489491 }
@@ -497,7 +499,8 @@ pipeline {
497499 sh ''' #! /bin/bash
498500 echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
499501 '''
500- sh " docker build \
502+ sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile.armhf"
503+ sh " docker buildx build \
501504 --label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
502505 --label \" org.opencontainers.image.authors=linuxserver.io\" \
503506 --label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-duckdns/packages\" \
@@ -510,7 +513,7 @@ pipeline {
510513 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
511514 --label \" org.opencontainers.image.title=Duckdns\" \
512515 --label \" org.opencontainers.image.description=[Duckdns](https://duckdns.org/) is a free service which will point a DNS (sub domains of duckdns.org) to an IP of your choice. The service is completely free, and doesn't require reactivation or forum posts to maintain its existence.\" \
513- --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} \
516+ --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} --platform=linux/arm/v7 \
514517 --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
515518 sh " docker tag ${ IMAGE} :arm32v7-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${ COMMIT_SHA} -${ BUILD_NUMBER} "
516519 retry(5 ) {
@@ -531,7 +534,8 @@ pipeline {
531534 sh ''' #! /bin/bash
532535 echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
533536 '''
534- sh " docker build \
537+ sh " sed -r -i 's|(^FROM .*)|\\ 1\\ n\\ nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64"
538+ sh " docker buildx build \
535539 --label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
536540 --label \" org.opencontainers.image.authors=linuxserver.io\" \
537541 --label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-duckdns/packages\" \
@@ -544,7 +548,7 @@ pipeline {
544548 --label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
545549 --label \" org.opencontainers.image.title=Duckdns\" \
546550 --label \" org.opencontainers.image.description=[Duckdns](https://duckdns.org/) is a free service which will point a DNS (sub domains of duckdns.org) to an IP of your choice. The service is completely free, and doesn't require reactivation or forum posts to maintain its existence.\" \
547- --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} \
551+ --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} --platform=linux/arm64 \
548552 --build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
549553 sh " docker tag ${ IMAGE} :arm64v8-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${ COMMIT_SHA} -${ BUILD_NUMBER} "
550554 retry(5 ) {
@@ -573,26 +577,12 @@ pipeline {
573577 else
574578 LOCAL_CONTAINER=${IMAGE}:${META_TAG}
575579 fi
576- if [ "${DIST_IMAGE}" == "alpine" ]; then
577- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
578- apk info -v > /tmp/package_versions.txt && \
579- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
580- chmod 777 /tmp/package_versions.txt'
581- elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
582- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
583- apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
584- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
585- chmod 777 /tmp/package_versions.txt'
586- elif [ "${DIST_IMAGE}" == "fedora" ]; then
587- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
588- rpm -qa > /tmp/package_versions.txt && \
589- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
590- chmod 777 /tmp/package_versions.txt'
591- elif [ "${DIST_IMAGE}" == "arch" ]; then
592- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
593- pacman -Q > /tmp/package_versions.txt && \
594- chmod 777 /tmp/package_versions.txt'
595- fi
580+ touch ${TEMPDIR}/package_versions.txt
581+ docker run --rm \
582+ -v /var/run/docker.sock:/var/run/docker.sock:ro \
583+ -v ${TEMPDIR}:/tmp \
584+ ghcr.io/anchore/syft:latest \
585+ ${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
596586 NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
597587 echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
598588 if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
0 commit comments