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/virtualenvwrapper.sh EOF
But I have this error return when I launch my building image docker :
---> 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 ?
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.