Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build custom image when Management Module is included #67

Open
proxna opened this issue Feb 25, 2024 · 0 comments
Open

Failed to build custom image when Management Module is included #67

proxna opened this issue Feb 25, 2024 · 0 comments

Comments

@proxna
Copy link

proxna commented Feb 25, 2024

Reproduction Steps:

  1. modify cm Dockerfile to use Management Module image:
# escape=`
ARG BASE_IMAGE
ARG SXA_IMAGE
ARG SPE_IMAGE
ARG TOOLING_IMAGE
ARG MANAGEMENT_SERVICES_IMAGE

FROM ${TOOLING_IMAGE} as tooling
FROM ${SPE_IMAGE} as spe
FROM ${SXA_IMAGE} as sxa
FROM ${MANAGEMENT_SERVICES_IMAGE} as management_services
FROM ${BASE_IMAGE}


SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Copy development tools and entrypoint
COPY --from=tooling \tools\ \tools\

WORKDIR C:\inetpub\wwwroot

# Add SPE module
COPY --from=spe \module\cm\content .\

# Add SXA module
COPY --from=sxa \module\cm\content .\
COPY --from=sxa \module\tools \module\tools
RUN C:\module\tools\Initialize-Content.ps1 -TargetPath .\; `
    Remove-Item -Path C:\module -Recurse -Force;

#copy the Sitecore Management Services Module
COPY --from=management_services c:\module\cm\content C:\inetpub\wwwroot

# Copy role transforms
COPY .\transforms\ \transforms\role\

# Perform role transforms
#RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path .\ -XdtPath C:\transforms\role`
  1. modify cm node in docker-compose.xp1.override.yml
`cm:
    image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-cm:${VERSION:-latest}
    build:
      context: ./docker/build/cm
      args:
        BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cm:${SITECORE_VERSION}
        SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-spe-assets:${SPE_VERSION}
        SXA_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-sxa-xm1-assets:${SXA_VERSION}
        TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
        MANAGEMENT_SERVICES_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-management-services-xp1-assets:${SITECORE_MODULE_VERSION}
    depends_on:
      - solution
    volumes:
      - ${LOCAL_DEPLOY_PATH}\website:C:\deploy
      - ${LOCAL_DATA_PATH}\cm:C:\inetpub\wwwroot\App_Data\logs
    environment:
      SITECORE_DEVELOPMENT_PATCHES: CustomErrorsOff
    entrypoint: powershell -Command "& C:\\tools\\entrypoints\\iis\\Development.ps1"`
  1. add SITECORE_MODULE_VERSION to .env
    SITECORE_MODULE_VERSION=5.1.25-1809
  2. run following command using terminal in administrator mode:
    docker-compose -f docker-compose.xp1.yml -f docker-compose.xp1.override.yml up -d

attempt of building cm image in step COPY --from=managementservices c:\module\cm\content C:\inetpub\wwwroot always ends with following error:
ERROR: Service 'cm' failed to build: invalid from flag value managementservices: pull access denied for managementservices, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
OS: Windows 11 PRO 23H2 22631.3155
Docker version: Docker Desktop 4.27.1(used Docker-compose in version 1.25.1 as well but with the same result)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant