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 :

  • CoreOS - Unable to access /mnt due to Permissions issue on /var/lib/docker
  • docker-compose volumes_from equivalent with version 3
  • run docker commands in non-interactive shell
  • Weird terminal formatting on Windows
  • How to build the rpm package with SHA-256 checksum for files?
  • What is the difference between running an application on ec2-server and running an application on top of docker on ec2-server?
  •  ---> 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 ?

  • Jenkins not able to access internet when running as docker container
  • docker exec: rpc error: code = 2 desc = oci runtime error: exec failed
  • How to make docker-compose scale start dependencies?
  • Which device Docker Container writing to?
  • How to inject external environment variables to jenkins configuration and pipeline jobs?
  • Migrating from shared development database to single database for each developer
  • 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.