Mercurial > hg
annotate contrib/packaging/docker/centos6 @ 41234:4c0d4bbdc395
packaging: allow running packaging with custom uid+gid for CentOS
rpmbuild in CentOS 7 has a bug causing rpmbuild to fail
with "Bad owner/group" if spec or source files are owned
by a different user: https://github.com/rpm-software-management/rpm/issues/2
This makes it very annoying to try and build the CentOS RPMs
on CentOS with Docker.
As an alternative, this change makes it possible to do so,
using an environment variable.
Differential Revision: https://phab.mercurial-scm.org/D5571
author | Mathias De Mare <mathias.de_mare@nokia.com> |
---|---|
date | Fri, 11 Jan 2019 14:55:31 +0100 |
parents | 11eda1f1b6e7 |
children |
rev | line source |
---|---|
22442
77da9c03be60
docker: use stable tags for fedora and centos
Mads Kiilerich <madski@unity3d.com>
parents:
21255
diff
changeset
|
1 FROM centos:centos6 |
38457
11eda1f1b6e7
packaging: consistently create build user in Dockerfiles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38003
diff
changeset
|
2 |
41234
4c0d4bbdc395
packaging: allow running packaging with custom uid+gid for CentOS
Mathias De Mare <mathias.de_mare@nokia.com>
parents:
38457
diff
changeset
|
3 RUN groupadd -g %GID% build && \ |
4c0d4bbdc395
packaging: allow running packaging with custom uid+gid for CentOS
Mathias De Mare <mathias.de_mare@nokia.com>
parents:
38457
diff
changeset
|
4 useradd -u %UID% -g %GID% -s /bin/bash -d /build -m build |
38457
11eda1f1b6e7
packaging: consistently create build user in Dockerfiles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38003
diff
changeset
|
5 |
34423
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
6 RUN yum install -y \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
7 gcc \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
8 gettext \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
9 make \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
10 python-devel \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
11 python-docutils \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
12 rpm-build \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
13 tar |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
14 |
22444
49ea49823769
dockerrpm: create a yum/dnf repo from the generated rpms
Mads Kiilerich <madski@unity3d.com>
parents:
22442
diff
changeset
|
15 # For creating repo meta data |
49ea49823769
dockerrpm: create a yum/dnf repo from the generated rpms
Mads Kiilerich <madski@unity3d.com>
parents:
22442
diff
changeset
|
16 RUN yum install -y createrepo |
34423
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
17 |
33596
af09413deb72
makefile: build on CentOS 6 with a Python 2.7
Mathias De Maré <mathias.de_mare@nokia.com>
parents:
22444
diff
changeset
|
18 # For python |
34423
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
19 RUN yum install -y \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
20 bzip2-devel \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
21 ncurses-devel \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
22 openssl-devel \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
23 readline-devel \ |
1baa077214ae
docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents:
33596
diff
changeset
|
24 zlib-devel |