Skip to content

Instantly share code, notes, and snippets.

@dcagnetta
Created July 17, 2023 07:57
Show Gist options
  • Save dcagnetta/201f3a56a85f1c0b861b8dd3a49eead5 to your computer and use it in GitHub Desktop.
Save dcagnetta/201f3a56a85f1c0b861b8dd3a49eead5 to your computer and use it in GitHub Desktop.
Docker extract files from container
- task: Docker@2
displayName: 'Build Api image'
inputs:
containerRegistry: '$(dockerRegistry)'
repository: '$(dockerHub)/$(imageName)'
Dockerfile: '$(workingDirectory)/Dockerfile-Api'
tags: |
$(tag)
latest
addPipelineData: false
- script: |
docker create --name testcontainer '$(dockerHub)/$(imageName):$(tag)'
docker cp testcontainer:/TestResults ./TestResults
docker container stop testcontainer
docker container rm testcontainer
displayName: 'Get Api Test Results'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment