Reputation: 700
My dockerfile looks as below :
FROM python:2.7 as builder
RUN pip install pika
RUN pip install requests
RUN pip install simplejson
RUN pip install datetime
RUN pip install grequests
RUN pip install urllib
RUN pip install pandas
COPY Action.py ./Action.py
COPY UtilFunctions.py ./UtilFunctions.py
WORKDIR /app
COPY . .
FROM apline
WORKDIR /app
COPY --from=builder /app /app
CMD [ "python","-u","./Action.py" ]
While building -> sudo docker build --rm -t rule1-test .
Gives following error ->
Step 1 : FROM python:2.7 as builder
Error parsing reference: "python:2.7 as builder" is not a valid repository/tag
Docker version is as below :
Docker version 1.12.6, build 88a4867/1.12.6
Is multistage not supported on this version I have installed docker on centos machine using
yum install docker
Upvotes: 2
Views: 591
Reputation: 5027
Multi-stage builds are a new feature in Docker 17.05, so you have to update your Docker version to 17.05 or a newer version.
Upvotes: 5