Re: Write content to file from Dockerfile and/or any other method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 2016-01-29, reynierpm@xxxxxxxxx <reynierpm@xxxxxxxxx> wrote:
> I am building a Dockerfile and I am setting up MariaDB repos as follow:

This question is probably way offtopic for a CentOS mailing list.

> # Setup MariaDB repos
> RUN touch /etc/yum.repos.d/MariaDB.repo
>
> What's the right way to do this? The one below?
>
> echo "[mariadb]" >> "/etc/yum.repos.d/MariaDB.repo"
> echo "name = MariaDB" >> "/etc/yum.repos.d/MariaDB.repo"
> echo "baseurl = http://yum.mariadb.org/5.5/centos6-amd64"; >>
> "/etc/yum.repos.d/MariaDB.repo"
> echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB"; >>
> "/etc/yum.repos.d/MariaDB.repo"
> echo "gpgcheck=1" >> "/etc/yum.repos.d/MariaDB.repo"

You probably want to do a COPY.  The Docker docs cover Dockerfile syntax
in detail:

https://docs.docker.com/engine/reference/builder/#copy

--keith

-- 
kkeller@xxxxxxxxxxxxxxxxxxxxxxxxxx


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux