JetBrains / teamcity-docker-agent

TeamCity agent docker image sources
https://hub.docker.com/r/jetbrains/teamcity-agent/
Apache License 2.0
77 stars 64 forks source link

Issue with apt installer #65

Closed sprudel79 closed 4 years ago

sprudel79 commented 4 years ago

Hi everyone, our Dockerfile to create a customized Teamcity Docker agents starts with the following lines:

FROM jetbrains/teamcity-agent:latest RUN apt-get update ...

Trying to build the image results in the following error:

E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/

Docker version is 19.03.09 running on Linux Mint 19.3 by the way. Is this an issue coming from the base image? Thanks in advance.

kir commented 4 years ago

Hi, try inserting USER root before RUN instruction

Hope this helps,

sprudel79 commented 4 years ago

Thanks @kir , it works now again. But out of curiosity, was there any change in the base image that has caused this behaviour?

kir commented 4 years ago

This happens due to this change: https://youtrack.jetbrains.com/issue/TW-65785 Glad it works again for you :)

sprudel79 commented 4 years ago

Perfect, so it's crystal clear for me now. Thanks again for the instant support.