Docker Build Failing with Given as STDIN as input

  build, command, docker, docker-image

Why Docker image build is getting failed when build with – ?

Host Details

 - docker desktop community 2.1.0.5 for Windows 
 - Windows 10

Dockerfile:

FROM ubuntu:latest
MAINTAINER "[email protected]"

RUN apt-get update 
  && apt-get install -y python3-pip python3-dev 
  && cd /usr/local/bin 
  && ln -s /usr/bin/python3 python 
  && pip3 install --upgrade pip

WORKDIR /app
COPY . /app
COPY requirements.txt /app/requirements.txt
RUN pip3 --no-cache-dir install -r requirements.txt
EXPOSE 5000
CMD ["python3", "my_service.py","--input-path= /input.csv", "--output-path=/output.csv"]

Folder Structure

-Root 
 -Application.py 
 -Dockerfile 
 -requirements.txt

COMMAND

 - Failing :  docker build - < Dockerfile

Message: ERROR: Could not open requirements file: [Errno 2] No such
file or directory: ‘requirements.txt’

 - Successful: docker build .

Source: Docker Questions

LEAVE A COMMENT