mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
Improve dockerfiles based on feedback from hadolint
Co-authored-by: Mikko Ylinen <mikko.ylinen@intel.com> Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
This commit is contained in:
parent
cb729f1517
commit
e9267e43c9
@ -25,7 +25,7 @@ ARG CMD=operator
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG EP=/usr/local/bin/intel_deviceplugin_operator
|
||||
ARG CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
|
@ -24,7 +24,7 @@
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -42,7 +42,8 @@ COPY . .
|
||||
ARG TOYBOX_VERSION="0.8.8"
|
||||
ARG TOYBOX_SHA256="2bed6bb9edd5a249023103cf0402a835b0e53d10304a263f6f1e77a8aa49a898"
|
||||
ARG ROOT=/install_root
|
||||
RUN apt update && apt -y install musl musl-tools musl-dev
|
||||
RUN apt-get update && apt-get --no-install-recommends -y install musl musl-tools musl-dev
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION.tar.gz -o toybox.tar.gz \
|
||||
&& echo "$TOYBOX_SHA256 toybox.tar.gz" | sha256sum -c - \
|
||||
&& tar -xzf toybox.tar.gz \
|
||||
|
@ -25,7 +25,7 @@ ARG CMD=dlb_plugin
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG EP=/usr/local/bin/intel_dlb_device_plugin
|
||||
ARG CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
|
@ -25,7 +25,7 @@ ARG CMD=dsa_plugin
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG EP=/usr/local/bin/intel_dsa_device_plugin
|
||||
ARG CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
|
@ -25,7 +25,7 @@ ARG CMD=fpga_admissionwebhook
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG EP=/usr/local/bin/intel_fpga_admissionwebhook
|
||||
ARG CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
|
@ -24,7 +24,7 @@
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG CMD=fpga_crihook
|
||||
ARG EP=/usr/local/fpga-sw/$CRI_HOOK
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
@ -57,8 +56,7 @@ ARG CMD=fpga_tool
|
||||
ARG EP=/usr/local/fpga-sw/$CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
@ -75,7 +73,8 @@ RUN echo "{\n\
|
||||
ARG TOYBOX_VERSION="0.8.8"
|
||||
ARG TOYBOX_SHA256="2bed6bb9edd5a249023103cf0402a835b0e53d10304a263f6f1e77a8aa49a898"
|
||||
ARG ROOT=/install_root
|
||||
RUN apt update && apt -y install musl musl-tools musl-dev
|
||||
RUN apt-get update && apt-get --no-install-recommends -y install musl musl-tools musl-dev
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION.tar.gz -o toybox.tar.gz \
|
||||
&& echo "$TOYBOX_SHA256 toybox.tar.gz" | sha256sum -c - \
|
||||
&& tar -xzf toybox.tar.gz \
|
||||
|
@ -25,7 +25,7 @@ ARG CMD=fpga_plugin
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG EP=/usr/local/bin/intel_fpga_device_plugin
|
||||
ARG CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
|
@ -24,7 +24,7 @@
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -46,8 +46,7 @@ ARG NFD_HOOK=intel-gpu-nfdhook
|
||||
ARG SRC_DIR=/usr/local/bin/gpu-sw
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
@ -57,7 +56,8 @@ RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-ku
|
||||
ARG TOYBOX_VERSION="0.8.8"
|
||||
ARG TOYBOX_SHA256="2bed6bb9edd5a249023103cf0402a835b0e53d10304a263f6f1e77a8aa49a898"
|
||||
ARG ROOT=/install_root
|
||||
RUN apt update && apt -y install musl musl-tools musl-dev
|
||||
RUN apt-get update && apt-get --no-install-recommends -y install musl musl-tools musl-dev
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION.tar.gz -o toybox.tar.gz \
|
||||
&& echo "$TOYBOX_SHA256 toybox.tar.gz" | sha256sum -c - \
|
||||
&& tar -xzf toybox.tar.gz \
|
||||
|
@ -25,7 +25,7 @@ ARG CMD=gpu_plugin
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG EP=/usr/local/bin/intel_gpu_device_plugin
|
||||
ARG CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
|
@ -25,7 +25,7 @@ ARG CMD=iaa_plugin
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG EP=/usr/local/bin/intel_iaa_device_plugin
|
||||
ARG CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
|
@ -15,22 +15,23 @@
|
||||
## limitations under the License.
|
||||
###
|
||||
FROM debian:unstable-slim AS builder
|
||||
RUN apt update && apt install -y --no-install-recommends gcc make patch autoconf automake libtool pkg-config libjson-c-dev uuid-dev curl ca-certificates
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gcc make patch autoconf automake libtool pkg-config libjson-c-dev uuid-dev curl ca-certificates
|
||||
ARG ACCEL_CONFIG_VERSION="3.4.6.4"
|
||||
ARG ACCEL_CONFIG_DOWNLOAD_URL="https://github.com/intel/idxd-config/archive/accel-config-v$ACCEL_CONFIG_VERSION.tar.gz"
|
||||
ARG ACCEL_CONFIG_SHA256="5f9ee68f51913d803b9b0e51cdadaff14ea1523f6e9e4d4ab3e85de644ba6d21"
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN curl -fsSL "$ACCEL_CONFIG_DOWNLOAD_URL" -o accel-config.tar.gz && echo "$ACCEL_CONFIG_SHA256 accel-config.tar.gz" | sha256sum -c - && tar -xzf accel-config.tar.gz
|
||||
RUN cd idxd-config-accel-config-v$ACCEL_CONFIG_VERSION && ./git-version-gen && autoreconf -i && ./configure -q --libdir=/usr/lib64 --disable-test --disable-docs && make && make install
|
||||
###
|
||||
FROM debian:unstable-slim
|
||||
RUN apt update && apt install -y libjson-c5 jq
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libjson-c5 jq && rm -rf /var/lib/apt/lists/\*
|
||||
COPY --from=builder /usr/lib64/libaccel-config.so.1.0.0 "/lib/x86_64-linux-gnu/"
|
||||
RUN ldconfig && mkdir -p /licenses/accel-config
|
||||
COPY --from=builder /usr/bin/accel-config /usr/bin/
|
||||
COPY --from=builder /accel-config.tar.gz /licenses/accel-config/
|
||||
ADD demo/idxd-init.sh /usr/local/bin/
|
||||
ADD demo/dsa.conf /idxd-init/
|
||||
ADD demo/iax.conf /idxd-init/
|
||||
COPY demo/idxd-init.sh /usr/local/bin/
|
||||
COPY demo/dsa.conf /idxd-init/
|
||||
COPY demo/iax.conf /idxd-init/
|
||||
RUN mkdir /idxd-init/scratch
|
||||
WORKDIR /idxd-init
|
||||
ENTRYPOINT bash /usr/local/bin/idxd-init.sh
|
||||
ENTRYPOINT ["bash", "/usr/local/bin/idxd-init.sh"]
|
||||
|
@ -24,7 +24,7 @@
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -42,7 +42,8 @@ COPY . .
|
||||
ARG TOYBOX_VERSION="0.8.8"
|
||||
ARG TOYBOX_SHA256="2bed6bb9edd5a249023103cf0402a835b0e53d10304a263f6f1e77a8aa49a898"
|
||||
ARG ROOT=/install_root
|
||||
RUN apt update && apt -y install musl musl-tools musl-dev
|
||||
RUN apt-get update && apt-get --no-install-recommends -y install musl musl-tools musl-dev
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION.tar.gz -o toybox.tar.gz \
|
||||
&& echo "$TOYBOX_SHA256 toybox.tar.gz" | sha256sum -c - \
|
||||
&& tar -xzf toybox.tar.gz \
|
||||
@ -60,5 +61,5 @@ LABEL name='intel-qat-initcontainer'
|
||||
LABEL summary='Intel® QAT initcontainer for Kubernetes'
|
||||
LABEL description='Intel QAT initcontainer initializes devices'
|
||||
COPY --from=builder /install_root /
|
||||
ADD demo/qat-init.sh /usr/local/bin/
|
||||
ENTRYPOINT /usr/local/bin/qat-init.sh
|
||||
COPY demo/qat-init.sh /usr/local/bin/
|
||||
ENTRYPOINT ["/usr/local/bin/qat-init.sh"]
|
||||
|
@ -24,7 +24,7 @@
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -46,8 +46,9 @@ WORKDIR $DIR
|
||||
COPY . .
|
||||
ARG QAT_DRIVER_RELEASE="qat1.7.l.4.14.0-00031"
|
||||
ARG QAT_DRIVER_SHA256="a68dfaea4308e0bb5f350b7528f1a076a0c6ba3ec577d60d99dc42c49307b76e"
|
||||
RUN mkdir -p /usr/src/qat && cd /usr/src/qat && wget https://downloadmirror.intel.com/30178/eng/$QAT_DRIVER_RELEASE.tar.gz && echo "$QAT_DRIVER_SHA256 $QAT_DRIVER_RELEASE.tar.gz" | sha256sum -c - && tar xf *.tar.gz && cd /usr/src/qat/quickassist/utilities/adf_ctl && make KERNEL_SOURCE_DIR=/usr/src/qat/quickassist/qat && install -D adf_ctl /install_root/usr/local/bin/adf_ctl
|
||||
RUN cd cmd/$CMD; GO111MODULE=${GO111MODULE} CGO_ENABLED=1 go install -tags kerneldrv; cd -
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN mkdir -p /usr/src/qat && cd /usr/src/qat && wget -q https://downloadmirror.intel.com/30178/eng/$QAT_DRIVER_RELEASE.tar.gz && echo "$QAT_DRIVER_SHA256 $QAT_DRIVER_RELEASE.tar.gz" | sha256sum -c - && tar xf *.tar.gz && cd /usr/src/qat/quickassist/utilities/adf_ctl && make KERNEL_SOURCE_DIR=/usr/src/qat/quickassist/qat && install -D adf_ctl /install_root/usr/local/bin/adf_ctl
|
||||
RUN (cd cmd/$CMD && GO111MODULE=${GO111MODULE} CGO_ENABLED=1 go install -tags kerneldrv)
|
||||
RUN chmod a+x /go/bin/$CMD && install -D /go/bin/$CMD /install_root/usr/local/bin/intel_qat_device_plugin
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
|
@ -25,7 +25,7 @@ ARG CMD=qat_plugin
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG EP=/usr/local/bin/intel_qat_device_plugin
|
||||
ARG CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
|
@ -25,7 +25,7 @@ ARG CMD=sgx_admissionwebhook
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG EP=/usr/local/bin/intel_sgx_admissionwebhook
|
||||
ARG CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
|
@ -24,7 +24,7 @@
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -46,8 +46,7 @@ ARG NFD_HOOK=intel-sgx-epchook
|
||||
ARG SRC_DIR=/usr/local/bin/sgx-sw
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
@ -57,7 +56,8 @@ RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-ku
|
||||
ARG TOYBOX_VERSION="0.8.8"
|
||||
ARG TOYBOX_SHA256="2bed6bb9edd5a249023103cf0402a835b0e53d10304a263f6f1e77a8aa49a898"
|
||||
ARG ROOT=/install_root
|
||||
RUN apt update && apt -y install musl musl-tools musl-dev
|
||||
RUN apt-get update && apt-get --no-install-recommends -y install musl musl-tools musl-dev
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION.tar.gz -o toybox.tar.gz \
|
||||
&& echo "$TOYBOX_SHA256 toybox.tar.gz" | sha256sum -c - \
|
||||
&& tar -xzf toybox.tar.gz \
|
||||
|
@ -25,7 +25,7 @@ ARG CMD=sgx_plugin
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -45,8 +45,7 @@ ARG EP=/usr/local/bin/intel_sgx_device_plugin
|
||||
ARG CMD
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") && install -D /go/bin/${CMD} /install_root${EP}
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
|
@ -24,7 +24,7 @@
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
##
|
||||
## GOLANG_BASE can be used to make the build reproducible by choosing an
|
||||
@ -43,11 +43,11 @@ ARG GOLICENSES_VERSION
|
||||
ARG CMD=vpu_plugin
|
||||
WORKDIR $DIR
|
||||
COPY . .
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN echo "deb-src http://deb.debian.org/debian unstable main" | tee -a /etc/apt/sources.list
|
||||
RUN apt update && apt -y install dpkg-dev libusb-1.0-0-dev
|
||||
RUN mkdir -p /install_root/licenses/libusb && cd /install_root/licenses/libusb && apt-get --download-only source libusb-1.0-0 && cd -
|
||||
RUN cd cmd/$CMD; GO111MODULE=${GO111MODULE} CGO_ENABLED=1 go install "${BUILDFLAGS}"; cd -
|
||||
RUN install -D /go/bin/vpu_plugin /install_root/usr/local/bin/intel_vpu_device_plugin
|
||||
RUN apt-get update && apt-get --no-install-recommends -y install dpkg-dev libusb-1.0-0-dev
|
||||
RUN mkdir -p /install_root/licenses/libusb && (cd /install_root/licenses/libusb && apt-get --download-only source libusb-1.0-0)
|
||||
RUN (cd cmd/$CMD; GO111MODULE=${GO111MODULE} CGO_ENABLED=1 go install "${BUILDFLAGS}") && install -D /go/bin/vpu_plugin /install_root/usr/local/bin/intel_vpu_device_plugin
|
||||
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \
|
||||
&& if [ ! -d "licenses/$CMD" ] ; then \
|
||||
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \
|
||||
@ -59,6 +59,6 @@ LABEL version='devel'
|
||||
LABEL release='1'
|
||||
LABEL name='intel-vpu-plugin'
|
||||
LABEL summary='Intel® VPU device plugin for Kubernetes'
|
||||
RUN apt update && apt -y install libusb-1.0-0
|
||||
RUN apt-get update && apt-get --no-install-recommends -y install libusb-1.0-0 && rm -rf /var/lib/apt/lists/\*
|
||||
COPY --from=builder /install_root /
|
||||
ENTRYPOINT ["/usr/local/bin/intel_vpu_device_plugin"]
|
||||
|
@ -1,7 +1,7 @@
|
||||
WORKDIR ${DIR}
|
||||
COPY . .
|
||||
|
||||
RUN cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}"; cd - \N
|
||||
RUN (cd cmd/${CMD}; GO111MODULE=${GO111MODULE} CGO_ENABLED=0 go install "${BUILDFLAGS}") \
|
||||
&& install -D /go/bin/${CMD} /install_root${EP}
|
||||
|
||||
#include "default_licenses.docker"
|
||||
|
@ -8,5 +8,5 @@
|
||||
## (see build-image.sh).
|
||||
## 2) and the default FINAL_BASE is primarily used to build Redhat Certified Openshift Operator container images that must be UBI based.
|
||||
## The RedHat build tool does not allow additional image build parameters.
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro
|
||||
ARG FINAL_BASE=registry.access.redhat.com/ubi8-micro:latest
|
||||
###
|
||||
|
@ -3,7 +3,8 @@ ARG TOYBOX_SHA256="2bed6bb9edd5a249023103cf0402a835b0e53d10304a263f6f1e77a8aa49a
|
||||
|
||||
ARG ROOT=/install_root
|
||||
|
||||
RUN apt update && apt -y install musl musl-tools musl-dev
|
||||
RUN apt-get update && apt-get --no-install-recommends -y install musl musl-tools musl-dev
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION.tar.gz -o toybox.tar.gz \N
|
||||
&& echo "$TOYBOX_SHA256 toybox.tar.gz" | sha256sum -c - \N
|
||||
&& tar -xzf toybox.tar.gz \N
|
||||
|
@ -1,13 +1,15 @@
|
||||
FROM debian:unstable-slim AS builder
|
||||
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
gcc make patch autoconf automake libtool pkg-config \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc make patch autoconf \
|
||||
automake libtool pkg-config \
|
||||
libjson-c-dev uuid-dev curl ca-certificates
|
||||
|
||||
ARG ACCEL_CONFIG_VERSION="3.4.6.4"
|
||||
ARG ACCEL_CONFIG_DOWNLOAD_URL="https://github.com/intel/idxd-config/archive/accel-config-v$ACCEL_CONFIG_VERSION.tar.gz"
|
||||
ARG ACCEL_CONFIG_SHA256="5f9ee68f51913d803b9b0e51cdadaff14ea1523f6e9e4d4ab3e85de644ba6d21"
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN curl -fsSL "$ACCEL_CONFIG_DOWNLOAD_URL" -o accel-config.tar.gz && \
|
||||
echo "$ACCEL_CONFIG_SHA256 accel-config.tar.gz" | sha256sum -c - && \
|
||||
tar -xzf accel-config.tar.gz
|
||||
@ -21,7 +23,7 @@ RUN cd idxd-config-accel-config-v$ACCEL_CONFIG_VERSION && \
|
||||
###
|
||||
FROM debian:unstable-slim
|
||||
|
||||
RUN apt update && apt install -y libjson-c5 jq
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libjson-c5 jq && rm -rf /var/lib/apt/lists/\*
|
||||
|
||||
COPY --from=builder /usr/lib64/libaccel-config.so.1.0.0 "/lib/x86_64-linux-gnu/"
|
||||
RUN ldconfig && mkdir -p /licenses/accel-config
|
||||
@ -29,11 +31,11 @@ RUN ldconfig && mkdir -p /licenses/accel-config
|
||||
COPY --from=builder /usr/bin/accel-config /usr/bin/
|
||||
COPY --from=builder /accel-config.tar.gz /licenses/accel-config/
|
||||
|
||||
ADD demo/idxd-init.sh /usr/local/bin/
|
||||
ADD demo/dsa.conf /idxd-init/
|
||||
ADD demo/iax.conf /idxd-init/
|
||||
COPY demo/idxd-init.sh /usr/local/bin/
|
||||
COPY demo/dsa.conf /idxd-init/
|
||||
COPY demo/iax.conf /idxd-init/
|
||||
|
||||
RUN mkdir /idxd-init/scratch
|
||||
|
||||
WORKDIR /idxd-init
|
||||
ENTRYPOINT bash /usr/local/bin/idxd-init.sh
|
||||
ENTRYPOINT ["bash", "/usr/local/bin/idxd-init.sh"]
|
||||
|
@ -19,6 +19,6 @@ LABEL description='Intel QAT initcontainer initializes devices'
|
||||
|
||||
COPY --from=builder /install_root /
|
||||
|
||||
ADD demo/qat-init.sh /usr/local/bin/
|
||||
COPY demo/qat-init.sh /usr/local/bin/
|
||||
|
||||
ENTRYPOINT /usr/local/bin/qat-init.sh
|
||||
ENTRYPOINT ["/usr/local/bin/qat-init.sh"]
|
||||
|
@ -15,19 +15,20 @@ COPY . .
|
||||
ARG QAT_DRIVER_RELEASE="qat1.7.l.4.14.0-00031"
|
||||
ARG QAT_DRIVER_SHA256="a68dfaea4308e0bb5f350b7528f1a076a0c6ba3ec577d60d99dc42c49307b76e"
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN mkdir -p /usr/src/qat \
|
||||
&& cd /usr/src/qat \
|
||||
&& wget https://downloadmirror.intel.com/30178/eng/$QAT_DRIVER_RELEASE.tar.gz \
|
||||
&& wget -q https://downloadmirror.intel.com/30178/eng/$QAT_DRIVER_RELEASE.tar.gz \
|
||||
&& echo "$QAT_DRIVER_SHA256 $QAT_DRIVER_RELEASE.tar.gz" | sha256sum -c - \
|
||||
&& tar xf *.tar.gz \
|
||||
&& cd /usr/src/qat/quickassist/utilities/adf_ctl \
|
||||
&& make KERNEL_SOURCE_DIR=/usr/src/qat/quickassist/qat \
|
||||
&& install -D adf_ctl /install_root/usr/local/bin/adf_ctl
|
||||
RUN cd cmd/$CMD; GO111MODULE=${GO111MODULE} CGO_ENABLED=1 go install -tags kerneldrv; cd -
|
||||
RUN (cd cmd/$CMD && GO111MODULE=${GO111MODULE} CGO_ENABLED=1 go install -tags kerneldrv)
|
||||
RUN chmod a+x /go/bin/$CMD \
|
||||
&& install -D /go/bin/$CMD /install_root/usr/local/bin/intel_qat_device_plugin
|
||||
|
||||
#include "default_licenses.docker"
|
||||
#include "default_licenses.docker"
|
||||
|
||||
|
||||
FROM debian:unstable-slim
|
||||
|
@ -10,14 +10,13 @@ ARG CMD=vpu_plugin
|
||||
WORKDIR $DIR
|
||||
COPY . .
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN echo "deb-src http://deb.debian.org/debian unstable main" | tee -a /etc/apt/sources.list
|
||||
RUN apt update && apt -y install dpkg-dev libusb-1.0-0-dev
|
||||
RUN apt-get update && apt-get --no-install-recommends -y install dpkg-dev libusb-1.0-0-dev
|
||||
RUN mkdir -p /install_root/licenses/libusb \
|
||||
&& cd /install_root/licenses/libusb \
|
||||
&& apt-get --download-only source libusb-1.0-0 \
|
||||
&& cd -
|
||||
RUN cd cmd/$CMD; GO111MODULE=${GO111MODULE} CGO_ENABLED=1 go install "${BUILDFLAGS}"; cd -
|
||||
RUN install -D /go/bin/vpu_plugin /install_root/usr/local/bin/intel_vpu_device_plugin
|
||||
&& (cd /install_root/licenses/libusb && apt-get --download-only source libusb-1.0-0)
|
||||
RUN (cd cmd/$CMD; GO111MODULE=${GO111MODULE} CGO_ENABLED=1 go install "${BUILDFLAGS}") \
|
||||
&& install -D /go/bin/vpu_plugin /install_root/usr/local/bin/intel_vpu_device_plugin
|
||||
|
||||
#include "default_licenses.docker"
|
||||
|
||||
@ -28,7 +27,7 @@ FROM debian:unstable-slim
|
||||
LABEL name='intel-vpu-plugin'
|
||||
LABEL summary='Intel® VPU device plugin for Kubernetes'
|
||||
|
||||
RUN apt update && apt -y install libusb-1.0-0
|
||||
RUN apt-get update && apt-get --no-install-recommends -y install libusb-1.0-0 && rm -rf /var/lib/apt/lists/\*
|
||||
COPY --from=builder /install_root /
|
||||
ENTRYPOINT ["/usr/local/bin/intel_vpu_device_plugin"]
|
||||
|
||||
|
@ -21,7 +21,7 @@ RUN mkdir /install_root && \
|
||||
--no-boot-update && \
|
||||
rm -rf /install_root/var/lib/swupd/*
|
||||
|
||||
ADD run-dpdk-test /install_root/usr/bin/run-dpdk-test
|
||||
COPY run-dpdk-test /install_root/usr/bin/run-dpdk-test
|
||||
|
||||
FROM scratch as final
|
||||
COPY --from=builder /install_root /
|
||||
|
@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y curl python3-dev git gcc g++ make cmake
|
||||
ARG OPAE_RELEASE=2.1.0-1
|
||||
ARG OPAE_SHA256=0c9f52ff1279ca5e34e64828ddf3a6c001fb2969a6349a966cd9515c1048ea01
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN mkdir -p /usr/src/opae && \
|
||||
cd /usr/src/opae && \
|
||||
curl -fsSL https://github.com/OPAE/opae-sdk/archive/${OPAE_RELEASE}.tar.gz -o opae.tar.gz && \
|
||||
@ -25,14 +26,13 @@ RUN cd /usr/src/opae/opae-sdk-${OPAE_RELEASE} && \
|
||||
|
||||
FROM debian:unstable-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y libjson-c5
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y libjson-c5
|
||||
|
||||
# Copy required nlb* utils and their dependencies to the final image
|
||||
COPY --from=builder /usr/src/opae/opae-sdk-*/build/bin/nlb* /usr/local/bin/
|
||||
COPY --from=builder /usr/src/opae/opae-sdk-*/build/lib /usr/local/lib/
|
||||
COPY --from=builder /usr/src/opae/opae-sdk-*/COPYING /usr/local/share/package-licenses/opae.COPYING
|
||||
RUN rm -rf /usr/local/lib/python3
|
||||
RUN ldconfig
|
||||
RUN rm -rf /usr/local/lib/python3 && ldconfig
|
||||
|
||||
COPY test_fpga.sh /usr/local/bin/
|
||||
ENTRYPOINT ["/usr/local/bin/test_fpga.sh"]
|
||||
|
Loading…
Reference in New Issue
Block a user