Docker Community Forums

Share and learn in the Docker community.

The command '/bin/sh -c wget -q filename.deb https://... .deb' returned a non-zero code: 4


(Arkadi Berikashvili) #1

Hi, I’m trying to download and install .Net Core using wget and I’m getting this error when I try to build docker image:
The command '/bin/sh -c wget -q packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb' returned a non-zero code: 4.

My Dockerfile looks like this:

`FROM ubuntu
RUN mkdir data
COPY . /data

RUN apt-get update
RUN apt-get install wget -y
RUN wget -q packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN apt-get install apt-transport-https -y
RUN apt-get update
RUN apt-get install dotnet-sdk-2.1.200 -y`

I’m using this command to build: docker build -t test-env .

Any ideas?