Azure docker container wont start

Rik Morskate 1 Reputation point


For the last couple of days I have been trying to get a Docker container running on Azure. I have a basic Laravel project and am using a basic Dockerfile and Azure pipeline and release pipeline.

The image is successfully pulled but afterwards is not starting. I am getting the following logs:

2021-08-09T17:22:37.829Z INFO - Status: Image is up to date for ******
2021-08-09T17:22:37.832Z INFO - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2021-08-09T17:22:37.879Z INFO - Starting container for site
2021-08-09T17:22:37.885Z INFO - docker run -d -p 3535:80 --name integration-docker_0_beec5a09 -e DOCKER_CUSTOM_IMAGE_NAME=****** -e PORT=80 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITES_PORT=80 -e WEBSITE_SITE_NAME=integration-docker -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e -e WEBSITE_INSTANCE_ID=e55efd6783db50fae15b26e5ec67d28845ef537db278e9c1346becd2b2f1a777 -e HTTP_LOGGING_ENABLED=1 ******
2021-08-09T17:22:40.900Z INFO - Initiating warmup request to container integration-docker_0_beec5a09 for site integration-docker
2021-08-09T17:22:41.975Z ERROR - Container integration-docker_0_beec5a09 for site integration-docker has exited, failing site start
2021-08-09T17:22:41.978Z ERROR - Container integration-docker_0_beec5a09 didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.
2021-08-09T17:22:41.985Z INFO - Stopping site integration-docker because it failed during startup.

I also see this error: standard_init_linux.go:219: exec user process caused: exec format error

Help is much appreciated.

Kind regards,

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
278 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Niko Mix 1 Reputation point

    The Issue is boils down to an Issue inside the container, which can come either by building the container from a different architecture than you container image or an issue executing your executable. Can you share your Dockerfile? Also the output from docker manifest inspect --verbose can help pinpoint the issue

    Otherwise these two links should point out the most common issues:

    0 comments No comments

  2. Rik Morskate 1 Reputation point

    Hi Nikomix,

    I saw those topics on Stackoverflow but my containter is being started by Azure. At least I see in the logs it's trying to.

    My Dockerfile:

    FROM php:8  
    # Install system dependencies  
    RUN apt-get update && apt-get install -y \  
        git \  
        curl \  
        libpng-dev \  
        libonig-dev \  
        libxml2-dev \  
        zip \  
    # Get latest Composer  
    RUN curl -sS | php -- --install-dir=/usr/local/bin --filename=composer  
    # Install PHP extensions  
    RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd  
    WORKDIR /app  
    COPY . /app  
    RUN composer install  
    EXPOSE 80  

    I also tried to deploy a Dockerfile with php:7.4-fpm

    And I am using this azure pipeline yml

    # Docker  
    # Build and push an image to Azure Container Registry  
    - main  
    - repo: self  
      # Container registry service connection established during pipeline creation  
      dockerRegistryServiceConnection: 'c64767bd-b4de-4a17-b058-7a69e0f096f4'  
      imageRepository: 'app'  
      containerRegistry: '****'  
      dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile'  
      tag: '$(Build.BuildId)'  
      # Agent VM image name  
      vmImageName: 'ubuntu-latest'  
    - stage: Build  
      displayName: Build and push stage  
      - job: Build  
        displayName: Build  
          vmImage: $(vmImageName)  
        - task: Docker@2  
          displayName: Build and push an image to container registry  
            command: buildAndPush  
            repository: $(imageRepository)  
            dockerfile: $(dockerfilePath)  
            containerRegistry: $(dockerRegistryServiceConnection)  
            tags: |  
    0 comments No comments