FROMus-docker.pkg.dev/migrate-modernize-public/modernize-plugins-prod/service-manager-runtime:1.0.3asservice-manager-runtimeFROMscratch# Tar containing data captured from the source VMADDvmFiles.tar.gz/
COPY--from=service-manager-runtime//
ADDblocklist.yaml/.m4a/blocklist.yaml
ADDlogs.yaml/code/config/logs/logsArtifact.yaml
ADDservices-config.yaml/.m4a/
ADDtempfiles.yaml/.m4a/
# If you want to update parts of the image, add your commands here.# For example:# RUN apt-get update# RUN apt-get install -y \# package1=version \# package2=version \# package3=version# RUN yum update# RUN wget http://github.comENTRYPOINT["/ko-app/service-manager-runtime","start","-c","/.m4a/"]
FROMus-docker.pkg.dev/migrate-modernize-public/modernize-plugins-prod/service-manager-runtime:1.0.3asservice-manager-runtimeFROMscratch# Tar containing data captured from the source VMADDvmFiles.tar.gz/
COPY--from=service-manager-runtime//
ADDblocklist.yaml/.m4a/blocklist.yaml
ADDlogs.yaml/code/config/logs/logsArtifact.yaml
ADDservices-config.yaml/.m4a/
ADDtempfiles.yaml/.m4a/
# If you want to update parts of the image, add your commands here.# For example:# RUN apt-get update# RUN apt-get install -y \# package1=version \# package2=version \# package3=version# RUN yum update# RUN wget http://github.comRUNzypperref-s && zypper-ninopensshENTRYPOINT["/ko-app/service-manager-runtime","start","-c","/.m4a/"]
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[],[],null,["# Post-migration image updates\n============================\n\nThis page describes how to perform maintenance operations for your\nmigrated workloads.\n\nThe container artifacts that you generate\naren't meant only for deployment of the migrated workload in the target\ncluster.\nYou also need them for *Day 2* maintenance operations, including applying\napplication and user-mode OS software updates, security patches, editing embedded\nconfigurations, adding or replacing files, and for updating the\nMigrate to Containers runtime software.\n\nReview the generated image Dockerfile\n-------------------------------------\n\nMaintenance operations use the generated Dockerfile and the captured\nsystem image layer. When combined with the Migrate to Containers runtime layer,\nthese files can be built into an executable container image.\n\nThe generated container artifacts are created with CI/CD pipeline build\nphase integration in mind, as described in the following diagram:\n\nThe Dockerfile is structured as a\n[multi-stage build](https://docs.docker.com/develop/develop-images/multistage-build/),\nfor easier maintenance and manipulation, while keeping the image from inflating.\n\nHere's a sample of a generated Dockerfile: \n\n FROM us-docker.pkg.dev/migrate-modernize-public/modernize-plugins-prod/service-manager-runtime:1.0.3 as service-manager-runtime\n\n FROM scratch\n\n # Tar containing data captured from the source VM\n ADD vmFiles.tar.gz /\n\n COPY --from=service-manager-runtime / /\n\n ADD blocklist.yaml /.m4a/blocklist.yaml\n\n ADD logs.yaml /code/config/logs/logsArtifact.yaml\n\n ADD services-config.yaml /.m4a/\n\n ADD tempfiles.yaml /.m4a/\n\n # If you want to update parts of the image, add your commands here.\n # For example:\n # RUN apt-get update\n # RUN apt-get install -y \\\n # package1=version \\\n # package2=version \\\n # package3=version\n # RUN yum update\n # RUN wget http://github.com\n\n ENTRYPOINT [\"/ko-app/service-manager-runtime\", \"start\", \"-c\", \"/.m4a/\"]\n\nFor more information on building container images with Cloud Build,\nsee [Building container images](/build/docs/building/build-containers).\n\nUpdate the migrated workload components layer\n---------------------------------------------\n\nFor any updates or modifications you want to apply to the migrated workload\nimage layer, you should apply them before the `ENTRYPOINT` directive.\n\nIn the following example, we update a container image migrated from a SUSE\nEnterprise Linux (SLES) VM as source, using Cloud Build and the\ngcloud CLI. The following example updates the SLES distro `openssh`\npackage.\n\nUpdated Dockerfile: \n\n FROM us-docker.pkg.dev/migrate-modernize-public/modernize-plugins-prod/service-manager-runtime:1.0.3 as service-manager-runtime\n\n FROM scratch\n\n # Tar containing data captured from the source VM\n ADD vmFiles.tar.gz /\n\n COPY --from=service-manager-runtime / /\n\n ADD blocklist.yaml /.m4a/blocklist.yaml\n\n ADD logs.yaml /code/config/logs/logsArtifact.yaml\n\n ADD services-config.yaml /.m4a/\n\n ADD tempfiles.yaml /.m4a/\n\n # If you want to update parts of the image, add your commands here.\n # For example:\n # RUN apt-get update\n # RUN apt-get install -y \\\n # package1=version \\\n # package2=version \\\n # package3=version\n # RUN yum update\n # RUN wget http://github.com\n\n RUN zypper ref -s \\&\\& zypper -n in openssh\n\n ENTRYPOINT [\"/ko-app/service-manager-runtime\", \"start\", \"-c\", \"/.m4a/\"]\n\nThen, [deploy the updated image to the cluster](/migrate/containers/docs/deploying-to-target-cluster).\n\nUpdate the Migrate to Containers layer version\n----------------------------------------------\n\nWhen new versions of Migrate to Containers software are released, you can\nupdate that software version in deployed workload images. Such updates may\ninclude new features, enhancements or bug fixes.\n\nTo update the Migrate to Containers software layer, edit the\nDockerfile and change the version tag to the updated version you want to apply.\n\nUsing the previous example, you can update the version from 1.0.3 to the\nhypothetical version 1.0.4 by editing the\n`FROM` directive to the following: \n\n FROM us-docker.pkg.dev/migrate-modernize-public/modernize-plugins-prod/service-manager-runtime:1.0.4 as service-manager-runtime\n\nAfter updating the Dockerfile, you will need to build a new workload container\nimage version and apply it to existing deployments to get it updated.\n\nWhat's next\n-----------\n\n- Learn how to [monitor migrated workloads](/migrate/containers/docs/monitoring-migrated-workloads)."]]