1*49cdfc7eSAndroid Build Coastguard Worker# SPDX-License-Identifier: GPL-2.0-or-later 2*49cdfc7eSAndroid Build Coastguard Worker# Copyright (c) 2023 SUSE LLC 3*49cdfc7eSAndroid Build Coastguard Worker 4*49cdfc7eSAndroid Build Coastguard WorkerARG PREFIX=docker.io/ 5*49cdfc7eSAndroid Build Coastguard WorkerARG DISTRO_NAME=alpine 6*49cdfc7eSAndroid Build Coastguard WorkerARG DISTRO_RELEASE=3.18 7*49cdfc7eSAndroid Build Coastguard Worker 8*49cdfc7eSAndroid Build Coastguard WorkerFROM $PREFIX$DISTRO_NAME:$DISTRO_RELEASE AS build 9*49cdfc7eSAndroid Build Coastguard WorkerARG LTPROOT=/opt/ltp 10*49cdfc7eSAndroid Build Coastguard WorkerARG DISTRO_NAME=alpine 11*49cdfc7eSAndroid Build Coastguard WorkerARG DISTRO_RELEASE=3.18 12*49cdfc7eSAndroid Build Coastguard Worker 13*49cdfc7eSAndroid Build Coastguard WorkerRUN mkdir /build 14*49cdfc7eSAndroid Build Coastguard WorkerWORKDIR /build 15*49cdfc7eSAndroid Build Coastguard WorkerCOPY . /build 16*49cdfc7eSAndroid Build Coastguard WorkerRUN ./ci/${DISTRO_NAME}.sh 17*49cdfc7eSAndroid Build Coastguard WorkerRUN git clean -fdX 18*49cdfc7eSAndroid Build Coastguard WorkerRUN ./build.sh -p $LTPROOT -i 19*49cdfc7eSAndroid Build Coastguard Worker 20*49cdfc7eSAndroid Build Coastguard WorkerFROM $PREFIX$DISTRO_NAME:$DISTRO_RELEASE 21*49cdfc7eSAndroid Build Coastguard WorkerARG LTPROOT=/opt/ltp 22*49cdfc7eSAndroid Build Coastguard WorkerARG KIRKROOT=/opt/kirk 23*49cdfc7eSAndroid Build Coastguard WorkerARG DISTRO_NAME=alpine 24*49cdfc7eSAndroid Build Coastguard Worker 25*49cdfc7eSAndroid Build Coastguard WorkerCOPY --from=build /build/ci/${DISTRO_NAME}-runtime.sh $LTPROOT/runtime-deps.sh 26*49cdfc7eSAndroid Build Coastguard WorkerRUN $LTPROOT/runtime-deps.sh 27*49cdfc7eSAndroid Build Coastguard Worker 28*49cdfc7eSAndroid Build Coastguard WorkerCOPY --from=build $LTPROOT $LTPROOT 29*49cdfc7eSAndroid Build Coastguard WorkerENV LTPROOT=$LTPROOT 30*49cdfc7eSAndroid Build Coastguard WorkerENV PATH=$LTPROOT/testcases/bin:$LTPROOT/bin:$PATH 31*49cdfc7eSAndroid Build Coastguard Worker 32*49cdfc7eSAndroid Build Coastguard WorkerRUN mkdir -p $KIRKROOT 33*49cdfc7eSAndroid Build Coastguard WorkerCOPY --from=build /build/tools/kirk $KIRKROOT 34*49cdfc7eSAndroid Build Coastguard Worker 35*49cdfc7eSAndroid Build Coastguard WorkerUSER ltp 36