簡體   English   中英

通過 Azure DevOps 構建一個加密的 Docker 容器

[英]Build an encrypted Docker container via Azure DevOps

我在 Azure DevOps 中有一個管道,它構建一個容器並將其推送到我的 Azure 容器注冊表中。

# Docker
# Build and push an image to Azure Container Registry
# https://learn.microsoft.com/azure/devops/pipelines/languages/docker

trigger:
- main

resources:
- repo: self

variables:
  # Container registry service connection established during pipeline creation
  dockerRegistryServiceConnection: 'myguyd'
  imageRepository: 'p2005'
  containerRegistry: 'myacr.azurecr.io'
  dockerfilePath: '$(Build.SourcesDirectory)/api/DOCKERFILE'
  tag: '$(Build.BuildId)'

  # Agent VM image name
  vmImageName: 'ubuntu-latest'

stages:
- stage: Build
  displayName: Build and push stage
  jobs:
  - job: Build
    displayName: Build
    pool:
      vmImage: $(vmImageName)
    steps:
    - task: Docker@2
      displayName: Build and push an image to container registry
      inputs:
        command: buildAndPush
        repository: $(imageRepository)
        dockerfile: $(dockerfilePath)
        containerRegistry: $(dockerRegistryServiceConnection)
        tags: latest

在容器中,我還有一些應用程序需要的原始數據文件。 從安全的角度來看,將原始數據放在容器中並不是很好。

所以,我在想是否有辦法加密 Docker 容器。 如果是這樣,如何在 Azure 管道中進行。

我不知道有沒有辦法通過 Azure 管道進行加密。 如果您偶然使用 AKS,可以看看機密計算

基於硬件的可信執行環境 (TEE) 提供了強有力的保證。 TEE 提供來自可信計算基礎 (TCB) 組件的硬件和軟件測量。 Azure 上的機密容器產品允許驗證這些測量並驗證容器應用程序是否在可驗證的執行環境中運行。

機密容器支持使用任何編程語言開發的自定義應用程序。 您還可以運行現成的 Docker 個容器。

您可以使用英特爾 SGX 和 AKS 實現這一目標。

要運行現有的 Docker 容器,機密計算節點上的應用程序需要抽象層或 Intel Software Guard Extensions (SGX) 軟件才能使用特殊的 CPU 指令集。 配置 SGX 以保護您的敏感應用程序代碼。 SGX 創建對 CPU 的直接執行,以從信任邊界中刪除來賓操作系統 (OS)、主機操作系統或管理程序。 此步驟減少了整體表面攻擊區域和漏洞。

Azure Kube.netes 服務 (AKS) 完全支持機密容器。 你可以在 AKS 上秘密運行現有容器。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM