3

I am trying to add SPE module to XP0 but getting error as shown in the image and its occurring while building the image. what am I doing wrong ? I have tried SPE 6.2-1809 version as well.

SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}spe-assets:${SPE_VERSION}  //docker-compose.override.yml   
SITECORE_MODULE_REGISTRY=scr.sitecore.com/sxp/modules/            // .env                    
SPE_VERSION=6.1.1-1809                                           //.env

enter image description here

Docker-Compose file -

cm:
    image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-cm:${BUILD_VERSION}
    build:
      context: ${LOCAL_BUILD_PATH}/cm
      args:
        BASE_IMAGE:  from AWS
        TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
        SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}spe-assets:${SPE_VERSION}
        HORIZON_INTEGRATION_ASSETS: ${SITECORE_COMMUNITY_REGISTRY}modules/custom-horizon-integration-assets:10.0.1-${NANOSERVER_VERSION}
        HORIZON_ZENITH_ASSETS: ${SITECORE_COMMUNITY_REGISTRY}modules/custom-horizon-zenith-assets:10.0.1-${NANOSERVER_VERSION}
        HORIZON_INSIGHTS_ASSETS: ${SITECORE_COMMUNITY_REGISTRY}modules/custom-horizon-insights-assets:10.0.1-${NANOSERVER_VERSION}
        RAZL_CONNECTION_IMAGE: ${RAZL_CONNECTION_IMAGE}
    volumes:
      - ${LOCAL_BUILD_PATH}\cm\deploy\website:c:\deploy
      - ${LOCAL_DATA_PATH}\cm:c:\inetpub\wwwroot\App_Data\logs
      - ${LOCAL_BUILD_PATH}\cm\deploy\serialization:c:\Serialization
    environment:
      RAZL_AccessGuid: ${RAZL_ACCESS_GUID}
    entrypoint: powershell -Command "& C:\tools\entrypoints\iis\Development.ps1"

Docker File -

# escape=`
ARG BASE_IMAGE
ARG SXA_IMAGE
ARG SPE_IMAGE
ARG TOOLING_IMAGE
ARG HORIZON_INTEGRATION_ASSETS
ARG HORIZON_ZENITH_ASSETS
ARG HORIZON_INSIGHTS_ASSETS
ARG RAZL_CONNECTION_IMAGE
FROM ${RAZL_CONNECTION_IMAGE} as razl
FROM ${BASE_IMAGE}
FROM ${SPE_IMAGE} as spe
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Copy code from deploy folder
COPY .\deploy\website C:\inetpub\wwwroot
# Copy serialization from deploy folder
COPY .\deploy\serialization C:\serialization
# Copy role transforms
COPY .\transforms\ \transforms\
# Add SPE module
COPY --from=spe C:\module\cm\content C:\inetpub\wwwroot\
# Copy Razl connector files
COPY --from=razl c:\RazlService c:\inetpub\wwwroot
# Perform role transforms
RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path .\ -XdtPath C:\transforms

WORKDIR C:\inetpub\wwwroot
2
  • What is your value for SITECORE_MODULE_REGISTRY? I'm guessing it doesn't point to the official Sitecore one
    – Mark Cassidy
    Jun 22 at 12:57
  • SITECORE_MODULE_REGISTRY=scr.sitecore.com/sxp/modules/
    – Siddharth
    Jun 22 at 13:02
5

You need to change your DockerFile. To this:

# escape=`
ARG BASE_IMAGE
ARG SXA_IMAGE
ARG SPE_IMAGE
ARG TOOLING_IMAGE
ARG HORIZON_INTEGRATION_ASSETS
ARG HORIZON_ZENITH_ASSETS
ARG HORIZON_INSIGHTS_ASSETS
ARG RAZL_CONNECTION_IMAGE
FROM ${RAZL_CONNECTION_IMAGE} as razl
FROM ${SPE_IMAGE} as spe
FROM ${BASE_IMAGE}
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; 

... etc

Each FROM command will change the "active compose context" or whatever the official term is. So FROM ${BASE_IMAGE} needs to be the last FROM statement you issue for the initial part of the build (as this is what the DockerFile expects). Then later on you switch in the additional layers you want to pull data from.

1
  • Thank you :) Image build successfully.
    – Siddharth
    Jun 22 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.