I am pretty new to the Docker
world. I am running this command:
docker build -t worker -f worker-Dockerfile-local .
This is the content of the Docker file:
FROM centos
MAINTAINER MyTeam
RUN /usr/bin/getent group worker || /usr/sbin/groupadd -r worker
RUN /usr/bin/getent passwd worker || /usr/sbin/useradd -r -g worker -s /sbin/nologin worker
# INSTALL PIP
RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
RUN python get-pip.py
ADD . /code
RUN pip install ./code
I get this message after starting this command:
Sending build context to Docker daemon 2.942 GB
My other builds take only a few seconds and the "Sending context to daemon" stage send only a few KB of data. I am not sure what's going on. Can someone help me out please?
I solved it, silly mistake.
Seems like Docker build tars up the current working directory (i.e. the folder containing the dockerfile). And it then uploads it to the Docker Daemon for the build steps. I had accidently put a big test data file (2.9 GB) in the working directory. And that was getting included in the build context. After removing it things are back to normal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With