mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00

As a build optimization, allow usage of pre-created licenses. Together with usage of go mod vendor, the container build times are significantly shorter. Dockerfiles are generated from include-snippets on the fly. Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
6 lines
441 B
Docker
6 lines
441 B
Docker
RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-kubernetes/LICENSE \N
|
|
&& if [ ! -d "licenses/$CMD" ] ; then \N
|
|
GO111MODULE=on go run github.com/google/go-licenses@${GOLICENSES_VERSION} save "./cmd/$CMD" \N
|
|
--save_path /install_root/licenses/$CMD/go-licenses ; \N
|
|
else mkdir -p /install_root/licenses/$CMD/go-licenses/ && cd licenses/$CMD && cp -r * /install_root/licenses/$CMD/go-licenses/ ; fi
|