Skip to content

Commit 0e8af3e

Browse files
committed
Add CentOS8 image
1 parent 24cedd5 commit 0e8af3e

File tree

6 files changed

+414
-20
lines changed

6 files changed

+414
-20
lines changed

.circleci/config.yml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,40 @@ jobs:
4848
TAG: centos7
4949
PARAMS: --distribution centos7
5050

51+
centos8:
52+
<<: *defaults
53+
environment:
54+
IMAGE: khos2ow/cloudstack-rpm-builder
55+
TAG: centos8
56+
PARAMS: --distribution centos8
57+
5158
latest:
5259
<<: *defaults
5360
environment:
5461
IMAGE: khos2ow/cloudstack-rpm-builder
55-
TAG: centos7
56-
PARAMS: --distribution centos7
62+
TAG: centos8
63+
PARAMS: --distribution centos8
5764

5865
workflows:
5966
version: 2
6067
build:
6168
jobs:
62-
- centos6:
63-
filters:
64-
tags:
65-
only: /v.*/
69+
- centos6
70+
# filters:
71+
# tags:
72+
# only: /v.*/
73+
74+
- centos7
75+
# filters:
76+
# tags:
77+
# only: /v.*/
6678

67-
- centos7:
68-
filters:
69-
tags:
70-
only: /v.*/
79+
- centos8
80+
# filters:
81+
# tags:
82+
# only: /v.*/
7183

72-
- latest:
73-
filters:
74-
tags:
75-
only: /v.*/
84+
- latest
85+
# filters:
86+
# tags:
87+
# only: /v.*/

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
.PHONY: all centos6 centos7 latest
18+
.PHONY: all centos6 centos7 centos8 latest
1919

2020
# Build docker tag based on provided info
2121
#
@@ -25,13 +25,16 @@ define build_tag
2525
docker build -t khos2ow/cloudstack-rpm-builder:$(1) $(2)
2626
endef
2727

28-
all: centos6 centos7 latest
28+
all: centos6 centos7 centos8 latest
2929

3030
centos6:
3131
$(call build_tag,centos6,centos6)
3232

3333
centos7:
3434
$(call build_tag,centos7,centos7)
3535

36+
centos8:
37+
$(call build_tag,centos8,centos8)
38+
3639
latest:
37-
$(call build_tag,latest,centos7)
40+
$(call build_tag,latest,centos8)

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ This will give portable, immutable and reproducable mechanism to build packages
2828

2929
## Supported tags and respective `Dockerfile` links
3030

31-
- [`latest`, `centos7` (centos7/Dockerfile)](https://github.com/khos2ow/cloudstack-rpm-builder/blob/master/centos7/Dockerfile)
31+
- [`latest`, `centos8` (centos8/Dockerfile)](https://github.com/khos2ow/cloudstack-rpm-builder/blob/master/centos8/Dockerfile)
32+
- [`centos7` (centos7/Dockerfile)](https://github.com/khos2ow/cloudstack-rpm-builder/blob/master/centos7/Dockerfile)
3233
- [`centos6` (centos6/Dockerfile)](https://github.com/khos2ow/cloudstack-rpm-builder/blob/master/centos6/Dockerfile)
3334

3435
## Packges installed in conatiner
@@ -94,7 +95,7 @@ Also you can build RPM packages of any remote repository without the need to man
9495

9596
#### Build packages of remote repository
9697

97-
Now let's assume we want to build packages of `HEAD` of `master` branch from https://github.com/apache/cloudstack repository, we build packages by mapping `/tmp` into `/mnt/build` in the container. The container will clone the repository (defined by `--git-remote` flag) and check out the REF (defined by `--git-ref` flag) in `/mnt/build/cloudstack` inside the container and can be accessed from `/tmp/cloudstack` from the host machine.
98+
Now let's assume we want to build packages of `HEAD` of `master` branch from [https://github.com/apache/cloudstack](https://github.com/apache/cloudstack) repository, we build packages by mapping `/tmp` into `/mnt/build` in the container. The container will clone the repository (defined by `--git-remote` flag) and check out the REF (defined by `--git-ref` flag) in `/mnt/build/cloudstack` inside the container and can be accessed from `/tmp/cloudstack` from the host machine.
9899

99100
docker run \
100101
-v /tmp:/mnt/build \
@@ -148,4 +149,4 @@ To see all the available options you can pass to `docker run ...` command:
148149

149150
## License
150151

151-
Licensed under [Apache License version 2.0](http://www.apache.org/licenses/LICENSE-2.0). Please see the [LICENSE](https://github.com/khos2ow/cloudstack-rpm-builder/blob/master/LICENSE) file included in the root directory of the source tree for extended license details.
152+
Licensed under [Apache License version 2.0](http://www.apache.org/licenses/LICENSE-2.0). Please see the [LICENSE](https://github.com/khos2ow/cloudstack-rpm-builder/blob/master/LICENSE) file included in the root directory of the source tree for extended license details.

centos8/Dockerfile

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
FROM centos:8
19+
LABEL maintainer="Khosrow Moossavi <me@khosrow.io> (@khos2ow)"
20+
21+
RUN \
22+
yum clean metadata && \
23+
yum install -y epel-release && \
24+
yum clean metadata && \
25+
yum install -y \
26+
make \
27+
which \
28+
mlocate \
29+
tar \
30+
rpm-build \
31+
yum-utils \
32+
createrepo \
33+
mkisofs \
34+
git \
35+
java-1.8.0-openjdk-devel \
36+
tomcat \
37+
python python3 python-dev py-pip \
38+
python-argparse python-yaml python-pip python-wheel \
39+
mysql-connector-python \
40+
gcc \
41+
gcc-c++ \
42+
jq \
43+
wget \
44+
ws-commons-util && \
45+
yum upgrade python-setuptools && \
46+
pip install --upgrade pip && \
47+
wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo && \
48+
yum clean metadata && \
49+
yum install -y \
50+
apache-maven && \
51+
yum clean all && rm -rf /var/cache/yum && \
52+
sed -i "s/%dist .el7$/%dist .el7.centos/g" /etc/rpm/macros.dist
53+
54+
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0
55+
56+
VOLUME /mnt/build
57+
WORKDIR /mnt/build
58+
59+
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
60+
COPY environment-info.sh /usr/local/bin/environment-info.sh
61+
62+
ENTRYPOINT ["docker-entrypoint.sh"]

0 commit comments

Comments
 (0)