@@ -431,7 +431,7 @@ pipeline {
431
431
}
432
432
steps {
433
433
echo " Running on node: ${ NODE_NAME} "
434
- sh " docker build \
434
+ sh " docker buildx build \
435
435
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
436
436
--label \" org.opencontainers.image.authors=linuxserver.io\" \
437
437
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-baseimage-rdesktop-web/packages\" \
@@ -444,7 +444,7 @@ pipeline {
444
444
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
445
445
--label \" org.opencontainers.image.title=Baseimage-rdesktop-web\" \
446
446
--label \" org.opencontainers.image.description=baseimage-rdesktop-web image by linuxserver.io\" \
447
- --no-cache --pull -t ${ IMAGE} :${ META_TAG} \
447
+ --no-cache --pull -t ${ IMAGE} :${ META_TAG} --platform=linux/amd64 \
448
448
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
449
449
}
450
450
}
@@ -461,7 +461,7 @@ pipeline {
461
461
stage(' Build X86' ) {
462
462
steps {
463
463
echo " Running on node: ${ NODE_NAME} "
464
- sh " docker build \
464
+ sh " docker buildx build \
465
465
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
466
466
--label \" org.opencontainers.image.authors=linuxserver.io\" \
467
467
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-baseimage-rdesktop-web/packages\" \
@@ -474,7 +474,7 @@ pipeline {
474
474
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
475
475
--label \" org.opencontainers.image.title=Baseimage-rdesktop-web\" \
476
476
--label \" org.opencontainers.image.description=baseimage-rdesktop-web image by linuxserver.io\" \
477
- --no-cache --pull -t ${ IMAGE} :amd64-${ META_TAG} \
477
+ --no-cache --pull -t ${ IMAGE} :amd64-${ META_TAG} --platform=linux/amd64 \
478
478
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
479
479
}
480
480
}
@@ -488,7 +488,7 @@ pipeline {
488
488
sh ''' #! /bin/bash
489
489
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
490
490
'''
491
- sh " docker build \
491
+ sh " docker buildx build \
492
492
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
493
493
--label \" org.opencontainers.image.authors=linuxserver.io\" \
494
494
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-baseimage-rdesktop-web/packages\" \
@@ -501,7 +501,7 @@ pipeline {
501
501
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
502
502
--label \" org.opencontainers.image.title=Baseimage-rdesktop-web\" \
503
503
--label \" org.opencontainers.image.description=baseimage-rdesktop-web image by linuxserver.io\" \
504
- --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} \
504
+ --no-cache --pull -f Dockerfile.armhf -t ${ IMAGE} :arm32v7-${ META_TAG} --platform=linux/arm/v7 \
505
505
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
506
506
sh " docker tag ${ IMAGE} :arm32v7-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${ COMMIT_SHA} -${ BUILD_NUMBER} "
507
507
retry(5 ) {
@@ -522,7 +522,7 @@ pipeline {
522
522
sh ''' #! /bin/bash
523
523
echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin
524
524
'''
525
- sh " docker build \
525
+ sh " docker buildx build \
526
526
--label \" org.opencontainers.image.created=${ GITHUB_DATE} \" \
527
527
--label \" org.opencontainers.image.authors=linuxserver.io\" \
528
528
--label \" org.opencontainers.image.url=https://github.com/linuxserver/docker-baseimage-rdesktop-web/packages\" \
@@ -535,7 +535,7 @@ pipeline {
535
535
--label \" org.opencontainers.image.ref.name=${ COMMIT_SHA} \" \
536
536
--label \" org.opencontainers.image.title=Baseimage-rdesktop-web\" \
537
537
--label \" org.opencontainers.image.description=baseimage-rdesktop-web image by linuxserver.io\" \
538
- --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} \
538
+ --no-cache --pull -f Dockerfile.aarch64 -t ${ IMAGE} :arm64v8-${ META_TAG} --platform=linux/arm64 \
539
539
--build-arg ${ BUILD_VERSION_ARG} =${ EXT_RELEASE} --build-arg VERSION=\" ${ VERSION_TAG} \" --build-arg BUILD_DATE=${ GITHUB_DATE} ."
540
540
sh " docker tag ${ IMAGE} :arm64v8-${ META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${ COMMIT_SHA} -${ BUILD_NUMBER} "
541
541
retry(5 ) {
@@ -564,26 +564,12 @@ pipeline {
564
564
else
565
565
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
566
566
fi
567
- if [ "${DIST_IMAGE}" == "alpine" ]; then
568
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
569
- apk info -v > /tmp/package_versions.txt && \
570
- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
571
- chmod 777 /tmp/package_versions.txt'
572
- elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
573
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
574
- apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \
575
- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
576
- chmod 777 /tmp/package_versions.txt'
577
- elif [ "${DIST_IMAGE}" == "fedora" ]; then
578
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
579
- rpm -qa > /tmp/package_versions.txt && \
580
- sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \
581
- chmod 777 /tmp/package_versions.txt'
582
- elif [ "${DIST_IMAGE}" == "arch" ]; then
583
- docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\
584
- pacman -Q > /tmp/package_versions.txt && \
585
- chmod 777 /tmp/package_versions.txt'
586
- fi
567
+ touch ${TEMPDIR}/package_versions.txt
568
+ docker run --rm \
569
+ -v /var/run/docker.sock:/var/run/docker.sock:ro \
570
+ -v ${TEMPDIR}:/tmp \
571
+ ghcr.io/anchore/syft:latest \
572
+ ${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
587
573
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
588
574
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
589
575
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
0 commit comments