forked from linux-test-project/ltp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainerfile
35 lines (27 loc) · 793 Bytes
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2023 SUSE LLC
ARG PREFIX=docker.io/
ARG DISTRO_NAME=alpine
ARG DISTRO_RELEASE=3.18
FROM $PREFIX$DISTRO_NAME:$DISTRO_RELEASE AS build
ARG LTPROOT=/opt/ltp
ARG DISTRO_NAME=alpine
ARG DISTRO_RELEASE=3.18
RUN mkdir /build
WORKDIR /build
COPY . /build
RUN ./ci/${DISTRO_NAME}.sh
RUN git clean -fdX
RUN ./build.sh -p $LTPROOT -i
FROM $PREFIX$DISTRO_NAME:$DISTRO_RELEASE
ARG LTPROOT=/opt/ltp
ARG KIRKROOT=/opt/kirk
ARG DISTRO_NAME=alpine
COPY --from=build /build/ci/${DISTRO_NAME}-runtime.sh $LTPROOT/runtime-deps.sh
RUN $LTPROOT/runtime-deps.sh
COPY --from=build $LTPROOT $LTPROOT
ENV LTPROOT=$LTPROOT
ENV PATH=$LTPROOT/testcases/bin:$LTPROOT/bin:$PATH
RUN mkdir -p $KIRKROOT
COPY --from=build /build/tools/kirk $KIRKROOT
USER ltp