launch a CAT command unix into Dockerfile

I would like to launch this vagrant command cat(run perfectly!) to provisionning my container with a Dockerfile :

# Configure Virtualenvwrapper.
RUN cat <<EOF >> /home/docker/.bashrc
# Virtualenvwrapper configuration.
export WORKON_HOME=\$HOME/.virtualenvs
export PROJECT_HOME=\$HOME/Devel
source /usr/local/bin/

But I have this error return when I launch my building image docker :

  • How to execute a shell command before the ENTRYPOINT via the dockerfile
  • gcloud connect to docker Daemon fail
  • Edit container project files from host
  • Why am I not seeing higher concurrent requests when increasing nodes/pods on a simple NGINX docker cluster?
  • Docker swarm nodes on private networks?
  • Docker root directory issues
  •  ---> 40f9ed8e187d
    Removing intermediate container 85f6c8536520
    Step 69 : RUN cat <<EOF >> /home/docker/.bashrc
     ---> Running in dcbb3d441f79
     ---> 78acd9c2e5d5
    Removing intermediate container dcbb3d441f79
    Step 70 : EXPORT
    Unknown instruction: EXPORT

    What is the trick for run a cat command unix into image with Dockerfile ?

  • Docker private registries and the default installer
  • Docker - Mount a docker volume on separate host partition
  • is there a way to crash a docker container deliberately?
  • Accessing services on the Docker host
  • docker-compose up didn't finish npm install.
  • How to solve `Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o` while compiling qpid-cpp within Docker Alpine?
  • One Solution collect form web for “launch a CAT command unix into Dockerfile”

    Dockerfiles are not batch files. Every line/command is isolated and committed.

    Just put the contents into a file and ADD/COPY it. If you need to customize it, SED it. Or if you really, really, really want to CAT into a file — put it in a real batch file, then ADD/COPY it, then RUN it.

    Also, less lines = less layers. 70 Steps? Yowzers.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.