Issue
Currently my dockerfile is just:
FROM ubuntu:latest
RUN apt-get update
RUN apt install software-properties-common -y
However when building the dockerfile and running the step apt install software-properties-common -y
the following error is in the messages:
#0 41.07 Setting up python3.10-minimal (3.10.6-1~22.04.2) ...
#0 41.16 [Errno 13] Permission denied: '/usr/lib/python3.10/__pycache__/__future__.cpython-310.pyc.139723958934016'dpkg: error processing package python3.10-minimal (--configure):
#0 41.16 installed python3.10-minimal package post-installation script subprocess returned error exit status 1
#0 41.17 Errors were encountered while processing:
#0 41.17 python3.10-minimal
#0 41.18 E: Sub-process /usr/bin/dpkg returned an error code (1)
------
failed to solve: executor failed running [/bin/sh -c apt install software-properties-common -y]: exit code: 100
Was wondering if you guys could please help me solve this error in order to finish building the dockerfile?
Solution
Turns out I had the snap
version of docker and that caused the error but when I downloaded the apt
version of docker from https://docs.docker.com/engine/install/ubuntu/ there was no error.
Answered By - James Chong Answer Checked By - Senaida (WPSolving Volunteer)