instruction: Create a Dockerfile for fundamentals
output: ```dockerfile
  from the most recent pushed latest imageSoftware Bill of Materials (SBOM) for supply chain transparencyProvenance attestation to verify how and where the image was built
  TipLearn more:Docker task for Azure PipelinesDocker SBOM AttestationsStep 4.4: Push the Docker image
  
  - task: Docker@2
   displayName: Push Docker Image
   condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
   inputs:
   command: push
   repository: $(imageName)
   tags: |
   $(buildTag)
   $(latestTag)By applying this condition, the pipeline builds the Docker image on every run to ensure early detection of issues, but only pushes the image to the registry when changes are merged into the main branchâkeeping your Docker Hub clean and focusedThis uploads both tags to Docker Hub:$(buildTag) ensures traceability per run.latest is used for most recent image references.Step 4.5 Logout of Docker (self-hosted agents)
  
  - script: docker logout
   displayName: Docker Logout (Self-hosted only)
   condition: ne(variables['Agent.OS'], 'Windows_NT')Executes docker logout at the end of the pipeline on Linux-based self-hosted agents to proactively clean up credentials and enhance security posture.SummaryWith this Azure Pipelines CI setup, you get:Secure Docker authentication using a built-in service connection.Automated image building and tagging triggered by code changes.Efficient builds leveraging Docker BuildKit cache.Safe cleanup with logout on persistent agents.Build images that meet modern software supply chain requirements with SBOM and attestationLearn moreAzure Pipelines Documentation: Comprehensive guide to configuring and managing CI/CD pipelines in Azure DevOps.Docker Task for Azure Pipelines: Detailed reference for using the Docker task in Azure Pipelines to build and push images.Docker Buildx Bake: Explore Docker's advanced build tool for complex, multi-stage, and multi-platform build setups. See also the
  Mastering Buildx Bake Guide for practical examples and best practices.Docker Build Cloud: Learn about Docker's managed build service for faster, scalable, and multi-platform image builds in the cloud.
  Request changesTable of contentsPrerequisitesOverviewSet up Azure DevOps to work with Docker HubStep 1: Configure a Docker Hub service connectionStep 2: Create your pipelineWhat this pipeline doesHow the pipeline worksStep 1: Define pipeline triggersStep 2: Define common variablesStep 3: Define pipeline stages and jobsStep 4: Job configurationSummaryLearn more
  
  Product offerings
  Pricing
  About us
  Contribute
  Read llms.txt
  Cookies Settings
  
  Status
  Legal```