Hello everyone. I have a problem I can’t install dos2unix inside a container:
Dockerfile:
FROM postgis/postgis:13-3.3
USER root
RUN apt-get update && apt-get install dos2unix && apt-get clean
It tries to install it,
=> CACHED [uncrosstab-abm-results 1/2] FROM docker.io/postgis/postgis:13-3.3 0.0s
=> [uncrosstab-abm-results 2/2] RUN apt-get update && apt-get install dos2unix && apt-get clean
But runs into a permissions error in /usr/bin:
#0 49.20 dpkg: error processing archive /var/cache/apt/archives/dos2unix_7.4.1-1_amd64.deb (--unpack):
#0 49.20 unable to create '/usr/bin/dos2unix.dpkg-new' (while processing './usr/bin/dos2unix'): Permission denied
#0 49.20 dpkg: error while cleaning up:
#0 49.20 unable to remove newly-extracted version of '/usr/bin/dos2unix': Permission denied
I do have my docker engine install on an external drive, could it be one of the weird MacOS extended permissions model thing? But, this /usr/bin directory is inside the container, not outside the container, so I doubt that’s the problem.
Any other clues as to what I should try? I’m exploring on some Windows hosts, to see if it’s only a MacOS Docker problem. I have reinstalled Docker latest version (engine v24.0.2, desktop 4.20.1 (110738), compose v2.18.1). I tried docker system prune -f
too, but it didn’t seem to help — just nuked a bunch of stuff so I had to reinstall.
Thanks,