Docker Community Forums

Share and learn in the Docker community.

Unable to locate package in microsoft/dotnet:1.0.0-core image

Hi,

I’m new to docker and linux.

The linux version in the docker container is a Debian GNU/Linux 8.

I try just to add a package that is not in the docker image and I need it to run my application in docker.

So, after I build the container from an existing image from microsoft/dotnet:1.0.0-core I try to install the package libgdiplus with the RUN command but I receive an error E: Unable to locate package libgdiplus.

I understand that the package is not found because it looks in the sources.list deb package repo file and try to find the package and does not find it anywhere. I try than to add in sources list some package src but i’m not sure witch one to add.

FROM microsoft/dotnet:1.0.0-core
WORKDIR /qcrencworker
ENV ASPNETCORE_WORKERURLS http://*:5002
ENV ASPNETCORE_ENVIRONMENT dev
EXPOSE 6666
ENTRYPOINT [“dotnet”, “App.dll”]
COPY . /qcrencworker

RUN sed -i ‘/jessie main/c\deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse’ /etc/apt/sources.list
RUN sed -i ‘/jessie main/c\deb http://us.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse’ /etc/apt/sources.list
RUN sed -i ‘/jessie-updates/c\deb http://us.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse’ /etc/apt/sources.list
RUN sed -i ‘/security/c\deb http:1//security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse’ /etc/apt/sources.list

RUN apt-get update && apt-get install -y libgdiplus