I am building a Dockerfile and I am setting up MariaDB repos as follow:
# Setup MariaDB repos RUN touch /etc/yum.repos.d/MariaDB.repo
I should write this inside the MariaDB.repo file: [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/5.5/centos6-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
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"
On 2016-01-29, reynierpm@gmail.com reynierpm@gmail.com 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
On Fri, 29 Jan 2016 06:31, Keith Keller <kkeller@...> wrote:
On 2016-01-29, reynierpm@gmail.com reynierpm@gmail.com 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:
Yep, this is a much better way to do such things. create the 'MariaDB.repo' in the direstory the 'Dockerfile' resides in, and use the following line in the Dockerfile:
[code] COPY MariaDB.repo /etc/yum.repos.d/MariaDB.repo [/code]
much better that way, for further tips on Dockerfile writing, I'll point you to the offical site "docs.docker.com", esp:
https://docs.docker.com/engine/articles/dockerfile_best-practices/
Have a nice weekend, - Yamaban.
Thx to both of you, I forgot to add a SOT before the title because yes this is more a Docker question than a Linux one, my bad
On Fri, Jan 29, 2016 at 7:12 AM, Yamaban foerster@lisas.de wrote:
On Fri, 29 Jan 2016 06:31, Keith Keller <kkeller@...> wrote:
On 2016-01-29, reynierpm@gmail.com reynierpm@gmail.com 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:
Yep, this is a much better way to do such things. create the 'MariaDB.repo' in the direstory the 'Dockerfile' resides in, and use the following line in the Dockerfile:
[code] COPY MariaDB.repo /etc/yum.repos.d/MariaDB.repo [/code]
much better that way, for further tips on Dockerfile writing, I'll point you to the offical site "docs.docker.com", esp:
https://docs.docker.com/engine/articles/dockerfile_best-practices/
Have a nice weekend,
- Yamaban.
CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos