Created
June 21, 2016 21:09
-
-
Save rshsmi/9b965d76dd37c28dc0d14704c029a6b5 to your computer and use it in GitHub Desktop.
Dockerfile to add multiple line to file - it is useful to "docker cp" a conf file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat Dockerfile | |
FROM centos:7 | |
RUN mkdir /work | |
RUN echo <<< EOL\ | |
line 1, \ | |
line 2, \ | |
line 3, \ | |
line 4 \ | |
line ... \ | |
EOL >> /etc/myconfig.conf; | |
# Build the container and tag it then: | |
$ docker cp $(docker ps -a -q):/etc/myconfig.conf /tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment