If you are getting apt add repository command not found error in Docker, make sure you add the following lines or command in the Docker file. RUN apt-get update && \\ apt-get install -y software-properties-common && \\ apt update