Browse code

Add Dockerfiles.centos7 and job-id files for CentOS image building

Add CentOS job-id files

Add Dockerfile.centos7 files

Remove Dockerfile.centos7 files when they are the same as Dockerfile

Put relavent centos changes into plain Dockerfiles

Ensure bsdtar is installed

We no longer need centosplus enabled

Remove Dockerfile.centos7 for openvswitch

Troy Dawson authored on 2016/07/15 03:35:30
Showing 30 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-base
0 1
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+#
1
+# This is the base image from which all OpenShift Origin images inherit. Only packages
2
+# common to all downstream images should be here. Depends on Centos 7.2+
3
+#
4
+# The standard name for this image is openshift/origin-base
5
+#
6
+FROM centos:centos7
7
+
8
+RUN INSTALL_PKGS="which git tar wget hostname sysvinit-tools util-linux bsdtar centos-release-openshift-origin \
9
+      socat ethtool device-mapper iptables tree findutils nmap-ncat e2fsprogs xfsprogs lsof" && \
10
+    yum install -y $INSTALL_PKGS && \
11
+    rpm -V $INSTALL_PKGS && \
12
+    yum clean all && \
13
+    mkdir -p /var/lib/origin
14
+
15
+LABEL io.k8s.display-name="OpenShift Origin Centos 7 Base" \
16
+      io.k8s.description="This is the base image from which all OpenShift Origin images inherit."
0 17
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-custom-docker-builder
... ...
@@ -17,7 +17,7 @@
17 17
 FROM openshift/origin-base
18 18
 
19 19
 RUN INSTALL_PKGS="gettext automake make docker" && \
20
-    yum install -y --enablerepo=centosplus $INSTALL_PKGS && \
20
+    yum install -y $INSTALL_PKGS && \
21 21
     rpm -V $INSTALL_PKGS && \
22 22
     yum clean all
23 23
 
24 24
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-docker-builder
0 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-sti-builder
0 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-deployer
0 1
new file mode 100644
... ...
@@ -0,0 +1,67 @@
0
+#
1
+# This image is used for running a host of an openshift dev cluster. This image is
2
+# a development support image and should not be used in production environments.
3
+#
4
+# The standard name for this image is openshift/dind
5
+#
6
+FROM centos:centos7
7
+
8
+## Configure systemd to run in a container
9
+ENV container=docker
10
+
11
+RUN systemctl mask\
12
+ auditd.service\
13
+ console-getty.service\
14
+ dev-hugepages.mount\
15
+ dnf-makecache.service\
16
+ docker-storage-setup.service\
17
+ getty.target\
18
+ lvm2-lvmetad.service\
19
+ sys-fs-fuse-connections.mount\
20
+ systemd-logind.service\
21
+ systemd-remount-fs.service\
22
+ systemd-udev-hwdb-update.service\
23
+ systemd-udev-trigger.service\
24
+ systemd-udevd.service\
25
+ systemd-vconsole-setup.service
26
+
27
+RUN cp /usr/lib/systemd/system/dbus.service /etc/systemd/system/; \
28
+  sed -i 's/OOMScoreAdjust=-900//' /etc/systemd/system/dbus.service
29
+
30
+VOLUME ["/run", "/tmp"]
31
+
32
+## Install origin repo
33
+RUN INSTALL_PKGS="centos-release-openshift-origin" && \
34
+    yum install -y $INSTALL_PKGS && \
35
+    rpm -V $INSTALL_PKGS && \
36
+    yum clean all
37
+
38
+## Install packages
39
+RUN INSTALL_PKGS="git golang mercurial tar make findutils \
40
+      gcc hostname bind-utils iproute iputils which procps-ng openssh-server \
41
+      docker openvswitch bridge-utils ethtool iptables-services" && \
42
+    yum install -y $INSTALL_PKGS && \
43
+    rpm -V --nofiles $INSTALL_PKGS && \
44
+    yum clean all
45
+
46
+# sshd should be enabled as needed
47
+RUN systemctl disable sshd.service
48
+
49
+## Configure dind
50
+ENV DIND_COMMIT 81aa1b507f51901eafcfaad70a656da376cf937d
51
+RUN curl -fL "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" \
52
+  -o /usr/local/bin/dind && chmod +x /usr/local/bin/dind
53
+RUN mkdir -p /etc/systemd/system/docker.service.d
54
+COPY dind.conf /etc/systemd/system/docker.service.d/
55
+
56
+RUN systemctl enable docker
57
+
58
+VOLUME /var/lib/docker
59
+
60
+## Hardlink init to another name to avoid having oci-systemd-hooks
61
+## detect containers using this image as requiring read-only cgroup
62
+## mounts.  dind containers should be run with --privileged to ensure
63
+## cgroups mounted with read-write permissions.
64
+RUN ln /usr/sbin/init /usr/sbin/dind_init
65
+
66
+CMD ["/usr/sbin/dind_init"]
0 67
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-docker-registry
0 1
new file mode 100644
... ...
@@ -0,0 +1,25 @@
0
+#
1
+# This is the integrated OpenShift Origin Docker registry. It is configured to
2
+# publish metadata to OpenShift to provide automatic management of images on push.
3
+#
4
+# The standard name for this image is openshift/origin-docker-registry
5
+#
6
+FROM openshift/origin-base
7
+
8
+RUN INSTALL_PKGS="origin-dockerregistry" && \
9
+    yum install -y $INSTALL_PKGS && \
10
+    rpm -V $INSTALL_PKGS && \
11
+    yum clean all
12
+
13
+COPY config.yml $REGISTRY_CONFIGURATION_PATH
14
+
15
+LABEL io.k8s.display-name="OpenShift Origin Image Registry" \
16
+      io.k8s.description="This is a component of OpenShift Origin and exposes a Docker registry that is integrated with the cluster for authentication and management."
17
+
18
+# The registry doesn't require a root user.
19
+USER 1001
20
+EXPOSE 5000
21
+VOLUME /registry
22
+ENV REGISTRY_CONFIGURATION_PATH=/config.yml
23
+
24
+CMD DOCKER_REGISTRY_URL=${DOCKER_REGISTRY_SERVICE_HOST}:${DOCKER_REGISTRY_SERVICE_PORT} /usr/bin/dockerregistry ${REGISTRY_CONFIGURATION_PATH}
0 25
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-keepalived-ipfailover
0 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: node
0 1
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+#
1
+# This is an OpenShift Origin node image with integrated OpenvSwitch SDN
2
+# If you do not require OVS SDN use the openshift/origin image instead.
3
+#
4
+# This image expects to have a volume mounted at /etc/origin/node that contains
5
+# a KUBECONFIG file giving the node permission to talk to the master and a
6
+# node configuration file.
7
+#
8
+# The standard name for this image is openshift/node
9
+#
10
+FROM openshift/origin
11
+
12
+COPY scripts/* /usr/local/bin/
13
+
14
+RUN INSTALL_PKGS="origin-sdn-ovs libmnl libnetfilter_conntrack openvswitch \
15
+      libnfnetlink iptables iproute bridge-utils procps-ng ethtool socat openssl \
16
+      binutils xz kmod-libs kmod sysvinit-tools device-mapper-libs dbus \
17
+      ceph-common iscsi-initiator-utils" && \
18
+    yum install -y $INSTALL_PKGS && \
19
+    rpm -V $INSTALL_PKGS && \
20
+    yum clean all && \
21
+    mkdir -p /usr/lib/systemd/system/origin-node.service.d /usr/lib/systemd/system/docker.service.d && \
22
+    chmod +x /usr/local/bin/* /usr/bin/openshift-*
23
+
24
+LABEL io.k8s.display-name="OpenShift Origin Node" \
25
+      io.k8s.description="This is a component of OpenShift Origin and contains the software for individual nodes when using SDN."
26
+VOLUME /etc/origin/node
27
+ENV KUBECONFIG=/etc/origin/node/node.kubeconfig
28
+ENTRYPOINT [ "/usr/local/bin/origin-node-run.sh" ]
0 29
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: openvswitch
0 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin
0 1
new file mode 100644
... ...
@@ -0,0 +1,27 @@
0
+#
1
+# This is the official OpenShift Origin image. It has as its entrypoint the OpenShift
2
+# all-in-one binary.
3
+#
4
+# While this image can be used for a simple node it does not support OVS based
5
+# SDN or storage plugins required for EBS, GCE, Gluster, Ceph, or iSCSI volume
6
+# management. For those features please use 'openshift/node' 
7
+#
8
+# The standard name for this image is openshift/origin
9
+#
10
+FROM openshift/origin-base
11
+
12
+RUN INSTALL_PKGS="origin" && \
13
+    yum install -y $INSTALL_PKGS && \
14
+    rpm -V $INSTALL_PKGS && \
15
+    yum clean all && \
16
+    setcap 'cap_net_bind_service=ep' /usr/bin/openshift
17
+
18
+LABEL io.k8s.display-name="OpenShift Origin Application Platform" \
19
+      io.k8s.description="OpenShift Origin is a platform for developing, building, and deploying containerized applications. See https://docs.openshift.org/latest for more on running OpenShift Origin."
20
+ENV HOME=/root \
21
+    OPENSHIFT_CONTAINERIZED=true \
22
+    KUBECONFIG=/var/lib/origin/openshift.local.config/master/admin.kubeconfig
23
+VOLUME /var/lib/origin
24
+WORKDIR /var/lib/origin
25
+EXPOSE 8443 53
26
+ENTRYPOINT ["/usr/bin/openshift"]
0 27
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-pod
0 1
new file mode 100644
... ...
@@ -0,0 +1,27 @@
0
+#
1
+# This is the official OpenShift Origin pod infrastructure image. It will stay running
2
+# until terminated by a signal and is the heart of each running pod. It holds on to
3
+# the network and IPC namespaces as containers come and go during the lifetime of the
4
+# pod.
5
+#
6
+# The standard name for this image is openshift/origin-pod
7
+#
8
+FROM centos:centos7
9
+
10
+## Install origin repo
11
+RUN INSTALL_PKGS="centos-release-openshift-origin" && \
12
+    yum install -y $INSTALL_PKGS && \
13
+    rpm -V $INSTALL_PKGS && \
14
+    yum clean all
15
+
16
+## Install packages
17
+RUN INSTALL_PKGS="origin-pod" && \
18
+    yum install -y $INSTALL_PKGS && \
19
+    rpm -V $INSTALL_PKGS && \
20
+    yum clean all && \
21
+    ln -s /usr/bin/pod /pod
22
+
23
+USER 1001
24
+LABEL io.k8s.display-name="OpenShift Origin Pod Infrastructure" \
25
+      io.k8s.description="This is a component of OpenShift Origin and holds on to the shared Linux namespaces within a Pod."
26
+ENTRYPOINT ["/pod"]
0 27
new file mode 100644
... ...
@@ -0,0 +1,2 @@
0
+job-id: origin-recycler
1
+
0 2
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-release
... ...
@@ -15,7 +15,7 @@ ENV VERSION=1.6 \
15 15
 ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin
16 16
 
17 17
 RUN mkdir $TMPDIR && \
18
-    INSTALL_PKGS="make gcc zip mercurial krb5-devel" && \
18
+    INSTALL_PKGS="make gcc zip mercurial krb5-devel bsdtar" && \
19 19
     yum install -y $INSTALL_PKGS && \
20 20
     rpm -V $INSTALL_PKGS && \
21 21
     yum clean all && \
... ...
@@ -15,7 +15,7 @@ ENV VERSION=1.4.2 \
15 15
 ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin
16 16
 
17 17
 RUN mkdir $TMPDIR && \
18
-    INSTALL_PKGS="make gcc zip mercurial krb5-devel golang golang-vet golang-cover golang-pkg-darwin-amd64 golang-pkg-windows-amd64 golang-pkg-linux-386" && \
18
+    INSTALL_PKGS="make gcc zip mercurial krb5-devel bsdtar golang golang-vet golang-cover golang-pkg-darwin-amd64 golang-pkg-windows-amd64 golang-pkg-linux-386" && \
19 19
     yum install -y $INSTALL_PKGS && \
20 20
     rpm -V $INSTALL_PKGS && \
21 21
     yum clean all && \
... ...
@@ -15,7 +15,7 @@ ENV VERSION=1.6.2 \
15 15
 ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin
16 16
 
17 17
 RUN mkdir $TMPDIR && \
18
-    INSTALL_PKGS="make gcc zip mercurial krb5-devel" && \
18
+    INSTALL_PKGS="make gcc zip mercurial krb5-devel bsdtar" && \
19 19
     yum install -y $INSTALL_PKGS && \
20 20
     rpm -V $INSTALL_PKGS && \
21 21
     yum clean all && \
... ...
@@ -15,7 +15,7 @@ ENV VERSION=1.7beta1 \
15 15
 ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin
16 16
 
17 17
 RUN mkdir $TMPDIR && \
18
-    INSTALL_PKGS="make gcc zip mercurial krb5-devel" && \
18
+    INSTALL_PKGS="make gcc zip mercurial krb5-devel bsdtar" && \
19 19
     yum install -y $INSTALL_PKGS && \
20 20
     rpm -V $INSTALL_PKGS && \
21 21
     yum clean all && \
22 22
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-egress-router
... ...
@@ -5,7 +5,9 @@
5 5
 
6 6
 FROM openshift/origin-base
7 7
 
8
-RUN yum install -y iproute iputils && \
8
+RUN INSTALL_PKGS="iproute iputils" && \
9
+    yum install -y $INSTALL_PKGS && \
10
+    rpm -V $INSTALL_PKGS && \
9 11
     yum clean all
10 12
 
11 13
 ADD egress-router.sh /bin/egress-router.sh
12 14
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-f5-router
0 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-haproxy-router-base
0 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+job-id: origin-haproxy-router
... ...
@@ -10,12 +10,14 @@ FROM openshift/origin
10 10
 #       this is temporary and should be removed when the container is switch to an empty-dir
11 11
 #       with gid support.
12 12
 #
13
-RUN yum -y install haproxy && \
13
+RUN INSTALL_PKGS="haproxy" && \
14
+    yum install -y $INSTALL_PKGS && \
15
+    rpm -V $INSTALL_PKGS && \
16
+    yum clean all && \
14 17
     mkdir -p /var/lib/haproxy/router/{certs,cacerts} && \
15 18
     mkdir -p /var/lib/haproxy/{conf,run,bin,log} && \
16 19
     touch /var/lib/haproxy/conf/{{os_http_be,os_edge_http_be,os_tcp_be,os_sni_passthrough,os_reencrypt,os_edge_http_expose,os_edge_http_redirect}.map,haproxy.config} && \
17 20
     chmod -R 777 /var && \
18
-    yum clean all && \
19 21
     setcap 'cap_net_bind_service=ep' /usr/sbin/haproxy
20 22
 
21 23
 COPY . /var/lib/haproxy/