Error while building

tarun k 280 Reputation points
2025-06-18T10:52:40.03+00:00

I am seeing following error in the pipeline

building at STEP "RUN apt-get update

Azure DevOps
{count} votes

Accepted answer
  1. Durga Reshma Malthi 4,430 Reputation points Microsoft External Staff Moderator
    2025-06-18T11:50:27.94+00:00

    Hi tarun k

    The error message you are encountering during the pipeline execution indicates that there is a permission issue when trying to run the apt-get update command in your Docker container. Specifically, the error E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied) suggests that the user running the command does not have the necessary permissions to access or create the required directories.

    Add USER root before the RUN apt-get update step:

    USER root
    

    If the directory /var/lib/apt/lists/partial is missing, you can create it before running the apt-get update command.

    RUN mkdir -p /var/lib/apt/lists/partial
    

    Hope this helps!

    Please Let me know if you have any queries.

    If you found the information helpful, please click "Upvote" on the post to let us know and consider accepting the answer as the token of appreciation. Thank You.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.