Skip to main content
The 2024 Developer Survey results are live! See the results
Added method to do edit in dockerfile w/o having to copy files into the container
Source Link
Peregrino69
  • 4.7k
  • 3
  • 23
  • 30

It seems that the Ubuntu 12.04 Precise repositories have moved. I had to modify the /etc/apt/sources.list to use ../old-releases/.. instead of ../archive/.. and all other prefixes.

And, since neither nano nor vi were available, I had to edit the file outside, and copy it into the container.

EDIT: You can do this in a Dockerfile as follows -

FROM ubuntu:12.04   
RUN sed -i s/archive/old-releases/g etc/apt/sources.list
RUN apt-get update && apt-get install ...

It seems that the Ubuntu 12.04 Precise repositories have moved. I had to modify the /etc/apt/sources.list to use ../old-releases/.. instead of ../archive/.. and all other prefixes.

And, since neither nano nor vi were available, I had to edit the file outside, and copy it into the container.

EDIT: You can do this in a Dockerfile as follows -

FROM ubuntu:12.04   
RUN sed -i s/archive/old-releases/g etc/apt/sources.list
RUN apt-get update && apt-get install ...

It seems that the Ubuntu 12.04 Precise repositories have moved. I had to modify the /etc/apt/sources.list to use ../old-releases/.. instead of ../archive/.. and all other prefixes.

And, since neither nano nor vi were available, I had to edit the file outside, and copy it into the container.

EDIT: You can do this in a Dockerfile as follows -

FROM ubuntu:12.04   
RUN sed -i s/archive/old-releases/g etc/apt/sources.list
RUN apt-get update && apt-get install ...
Added method to do edit in dockerfile w/o having to copy files into the container
Source Link

It seems that the Ubuntu 12.04 Precise repositories have moved. I had to modify the /etc/apt/sources.list to use ../old-releases/.. instead of ../archive/.. and all other prefixes.

And, since neither nano nor vi were available, I had to edit the file outside, and copy it into the container.

EDIT: You can do this in a Dockerfile as follows -

FROM ubuntu:12.04   
RUN sed -i s/archive/old-releases/g etc/apt/sources.list
RUN apt-get update && apt-get install ...

It seems that the Ubuntu 12.04 Precise repositories have moved. I had to modify the /etc/apt/sources.list to use ../old-releases/.. instead of ../archive/.. and all other prefixes.

And, since neither nano nor vi were available, I had to edit the file outside, and copy it into the container.

It seems that the Ubuntu 12.04 Precise repositories have moved. I had to modify the /etc/apt/sources.list to use ../old-releases/.. instead of ../archive/.. and all other prefixes.

And, since neither nano nor vi were available, I had to edit the file outside, and copy it into the container.

EDIT: You can do this in a Dockerfile as follows -

FROM ubuntu:12.04   
RUN sed -i s/archive/old-releases/g etc/apt/sources.list
RUN apt-get update && apt-get install ...
Source Link
Thalia
  • 658
  • 5
  • 13
  • 28

It seems that the Ubuntu 12.04 Precise repositories have moved. I had to modify the /etc/apt/sources.list to use ../old-releases/.. instead of ../archive/.. and all other prefixes.

And, since neither nano nor vi were available, I had to edit the file outside, and copy it into the container.