How to access docker image on AzureDevops?

Viewed 17

I want to create a Docker image of a Laravel Application on Azure Devops and deploy it to a GCR, I commited a project created with laravel 5.5 that works with Docker on local. I thought that if I created a Build pipeline on Azure Devops It would take docker-compose.yml but it failed, so i tried using azure-pipeline.yml and i was able to create an image (still don't know where is it placed). I would like to know how can I access docker image the way i do in local using a command line. is that possible?

this is the yaml file

trigger:
- my_build

resources:
- repo: self

variables:
  tag: '$(Build.BuildId)'
  GOOGLE_PROYECT_ID: "deft-clarity-myGCPry"
  GOOGLE_PROYECT_NAME: "Dashboard LW"
  GOOGLE_APPLICATION_CREDENTIALS: '$(admin_gcr_myGCPry.secureFilePath)'
  GOOGLE_CLOUD_KEYFILE_JSON: '$(admin_gcr_myGCPry.secureFilePath)'

stages:
- stage: Build
  displayName: Build mypr img
  jobs:
  - job: Build_My_Pry_Image
    displayName: Job Build Dashboard Image

    pool:
      vmImage: ubuntu-latest
    steps:
    - task: Docker@2
      displayName: Build an image
      inputs:
        command: build
        dockerfile: '$(Build.SourcesDirectory)/.docker/Dockerfile'
        tags: |
          $(tag)
    - task: DownloadSecureFile@1
      name: admin_gcr_361712
      displayName: Download Service Account
      inputs:
        secureFile: 'admin-gcr-mygcpry.json'
    - bash: 'echo $GOOGLE_PROYECT_ID'
    - bash: 'gcloud --version'
      name: "version"
    - bash: 'gcloud auth activate-service-account admin-gcr@deft-clarity-myGCPry.iam.gserviceaccount.com --key-file=$GOOGLE_APPLICATION_CREDENTIALS'
      name: "Activate_Service"
    - bash: 'gcloud config set proyect deft-clarity-myCGPry'
    - bash: 'gcloud config list'
    - bash: 'gcloud compute network list' ```
0 Answers
Related