Run apt update before each apt command
Docker caches each step and the apt cache may be outdated which lets apt install fail. So apt update must be run before each separate RUN apt command.