[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Using a custom AppArmor profile\n===============================\n\n[AppArmor](https://apparmor.net/) lets a system administrator\nrestrict capabilities of a deployed container by using custom profiles. In some cases,\nyou might have to apply a custom profile to your deployed container to customize\nits capabilities.\n\nTo customize the AppArmor profile:\n\n1. Create the profile on the cluster where you are deploying your migrated container.\n See the [AppArmor](https://apparmor.net/) documentation\n for more information.\n\n2. Edit the `deployment_spec.yaml` file to add the `HC_APPARMOR_PROFILE` environment\n variable with the name of the AppArmor profile:\n\n spec:\n containers:\n - image: gcr.io/my-project/my-container:v1.0.0\n name: my-container\n env:\n - name: HC_APPARMOR_PROFILE\n value: \"apparmor-profile-name\"\n securityContext:\n privileged: true\n ...\n\n See [Reviewing generated deployment files](/migrate/containers/docs/review-deployment-files) for more\n on editing `deployment_spec.yaml`."]]