For compatibility, I need to use this old image but even after installing software-properties-common both commands are not found:
apt-add-repository or add-apt-repository
All I could find was to install software-properties-common but that does not help either.
FROM ubuntu:precise
Set environment variables to avoid interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
Update package lists and install basic packages
RUN apt-get update &&
apt-get upgrade -y &&
apt-get install -y
sudo
curl
vim
wget
git
nano
software-properties-common
build-essential &&
rm -rf /var/lib/apt/lists/*
Start a shell by default when the container starts
CMD ["/bin/bash"]