gitlab-ci-pipeline-php: E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Runner is failing when trying to open a lock file because it says I do not have root permissions?

Running with gitlab-runner 10.0.0-rc.1 (6331f360)
  on docker-auto-scale (4e4528ca)
Using Docker executor with image edbizarro/gitlab-ci-pipeline-php:7.0 ...
Using docker image sha256:ad2a804be38eddec66059b05a6ee5f596e3887ddddca62219c13d76ed306215e for predefined container...
Pulling docker image edbizarro/gitlab-ci-pipeline-php:7.0 ...
Using docker image edbizarro/gitlab-ci-pipeline-php:7.0 ID=sha256:8a485ae35d7ab8bed1c497efaeb1b88f44ccd938031c36a254a79b6d4348e974 for build container...
Running on runner-4e4528ca-project-3617016-concurrent-0 via runner-4e4528ca-machine-1506001341-3fda522f-digital-ocean-2gb...
Cloning repository...
Cloning into '/builds/myprojectnameisredacted'...
Checking out b888db38 as feature/featureBranch123...
Skipping Git submodules setup
Checking cache for feature/featureBranch123...
FATAL: file does not exist                         
Failed to extract cache
$ set -xe
$ apt-get install -y libxml2-dev nodejs npm
++ echo '$ apt-get install -y libxml2-dev nodejs npm'
++ apt-get install -y libxml2-dev nodejs npm
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
ERROR: Job failed: exit code 1

Any thoughts?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

@quincarter please invalidate your cache, the older cache was generated with the image using the root user, and now the user is php

hi @quincarter , edbizarro/gitlab-ci-pipeline-php:7.1-alpine image must be fixed with my PR #11 , and sudo package available in image.