diff --git a/Dockerfile b/Dockerfile index 1ac748600a..25bbb74d73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -160,7 +160,6 @@ COPY cmd/ops_agent_uap_wrapper cmd/ops_agent_uap_wrapper COPY ./builds/ops_agent_plugin.sh . RUN ./ops_agent_plugin.sh /work/cache/ - FROM centos8-build-golang-base AS centos8-build WORKDIR /work COPY . /work @@ -481,7 +480,6 @@ COPY cmd/agent_wrapper cmd/agent_wrapper COPY ./builds/agent_wrapper.sh . RUN ./agent_wrapper.sh /work/cache/ - FROM bullseye-build-golang-base AS bullseye-build-ops-agent-uap-plugin WORKDIR /work COPY cmd/ops_agent_uap_wrapper cmd/ops_agent_uap_wrapper diff --git a/dockerfiles/template b/dockerfiles/template index 0becca83c2..1a2c26ec61 100644 --- a/dockerfiles/template +++ b/dockerfiles/template @@ -72,6 +72,11 @@ COPY cmd/agent_wrapper cmd/agent_wrapper COPY ./builds/agent_wrapper.sh . RUN ./agent_wrapper.sh /work/cache/ +FROM {target_name}-build-golang-base AS {target_name}-build-ops-agent-uap-plugin +WORKDIR /work +COPY cmd/ops_agent_uap_wrapper cmd/ops_agent_uap_wrapper +COPY ./builds/ops_agent_plugin.sh . +RUN ./ops_agent_plugin.sh /work/cache/ FROM {target_name}-build-golang-base AS {target_name}-build WORKDIR /work @@ -89,6 +94,7 @@ COPY --from={target_name}-build-fluent-bit /work/cache /work/cache COPY --from={target_name}-build-systemd /work/cache /work/cache COPY --from={target_name}-build-diagnostics /work/cache /work/cache COPY --from={target_name}-build-wrapper /work/cache /work/cache +COPY --from={target_name}-build-ops-agent-uap-plugin /work/cache /work/cache {package_build} FROM scratch AS {target_name}