簡體   English   中英

在azure管道上拉並運行Linux docker映像

[英]Pull and Run a Linux docker image on an azure pipeline

在AZURE PIPELINE中拉並運行基於Linux docker的映像時,出現以下錯誤:“映像操作系統“ Linux”不能在該平台上使用”

  1. 我創建一個Linux docker映像
  2. 我將圖片推送到天藍色注冊表
  3. 我將蔚藍管道設置如下:
    • Docker CLI
    • Azure CLI:
    • 我登錄到注冊表
    • 命令行:
    • 我這樣做:docker pull image
    • 我這樣做:docker run -it image

該圖顯示了Azure管道

運行管道時,出現以下錯誤:“此平台上不能使用映像操作系統“ Linux”

腳本輸出:

2019-03-25T21:23:03.4513990Z ##[section]Starting: Command Line Script
2019-03-25T21:23:03.4616971Z ==============================================================================
2019-03-25T21:23:03.4617284Z Task         : Command Line
2019-03-25T21:23:03.4617442Z Description  : Run a command line script using cmd.exe on Windows and bash on macOS and Linux.
2019-03-25T21:23:03.4617592Z Version      : 2.146.1
2019-03-25T21:23:03.4617715Z Author       : Microsoft Corporation
2019-03-25T21:23:03.4618046Z ==============================================================================
2019-03-25T21:23:04.8241638Z Generating script.
2019-03-25T21:23:04.9020040Z ##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\157d3a61-fe5f-46b2-b74e-1082d4532014.cmd""
2019-03-25T21:23:05.7814076Z v1: Pulling from hubb-api-tests
2019-03-25T21:23:06.2370457Z image operating system "linux" cannot be used on this platform
2019-03-25T21:23:06.2872386Z the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty'
2019-03-25T21:23:06.3934386Z ##[error]Cmd.exe exited with code '1'.
2019-03-25T21:23:06.4549404Z ##[section]Finishing: Command Line Script

我希望能夠提取圖像並在Azure DevOps管道上運行它,因為我在本地計算機上測試了相同的步驟,沒有任何問題。

非常感謝你

該圖顯示了帶錯誤的腳本輸出

您只能使用配置為允許在Windows上運行linux容器的Windows代理來實現此目的。 托管代理將不允許這樣做。

暫無
暫無

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

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