mirror of
https://github.com/teddysun/across.git
synced 2025-01-18 22:09:35 +08:00
Update comments
This commit is contained in:
parent
f0f1a1fb2f
commit
34611e1aa4
@ -1,37 +0,0 @@
|
||||
# Dockerfile for build RPM packages.
|
||||
# Copyright (C) 2021 Teddysun <i@teddysun.com>
|
||||
|
||||
FROM --platform=${TARGETPLATFORM} almalinux:8
|
||||
LABEL maintainer="Teddysun <i@teddysun.com>"
|
||||
|
||||
RUN yum install -y yum-utils epel-release && \
|
||||
yum-config-manager --enable epel && \
|
||||
yum-config-manager --enable powertools && \
|
||||
rpm -e --nodeps coreutils-single && \
|
||||
yum install -y tar wget git tree gcc gcc-c++ \
|
||||
sudo net-tools make cmake zstd libzstd \
|
||||
bash coreutils diffutils patch ca-certificates \
|
||||
rpm-build rpm-devel rpmlint rpmdevtools \
|
||||
asciidoc audit-libs-devel binutils-devel flex \
|
||||
libcap-devel newt-devel pciutils-devel perl-generators \
|
||||
python3 python3-devel python3-docutils rsync xmlto bc bison \
|
||||
java-devel ncurses-devel numactl-devel openssl-devel perl-devel \
|
||||
elfutils-devel xz-devel perl-ExtUtils-Embed && \
|
||||
yum clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
|
||||
|
||||
RUN useradd builder -u 1000 -m -G users,wheel && \
|
||||
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||
echo "# macros" > /home/builder/.rpmmacros && \
|
||||
echo "%_topdir /home/builder/rpmbuild" >> /home/builder/.rpmmacros && \
|
||||
echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
mkdir -p /home/builder/rpmbuild && \
|
||||
chown -R builder /home/builder
|
||||
|
||||
USER builder
|
||||
VOLUME /home/builder
|
||||
WORKDIR /home/builder/rpmbuild
|
||||
CMD ["/bin/bash"]
|
@ -1,39 +0,0 @@
|
||||
# Dockerfile for build RPM packages.
|
||||
# Copyright (C) 2021 Teddysun <i@teddysun.com>
|
||||
|
||||
FROM centos:6
|
||||
LABEL maintainer="Teddysun <i@teddysun.com>"
|
||||
|
||||
RUN sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo && \
|
||||
sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=https:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo && \
|
||||
yum install -y yum-utils epel-release && \
|
||||
yum-config-manager --enable epel && \
|
||||
yum install -y centos-release-scl-rh && \
|
||||
sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo && \
|
||||
sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=https:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo && \
|
||||
yum install -y tar wget git tree gcc gcc-c++ \
|
||||
sudo net-tools make cmake bash python-devel \
|
||||
python asciidoc bc m4 patchutils xmlto audit-libs-devel \
|
||||
rpm-build rpm-devel rpmlint rpmdevtools \
|
||||
devtoolset-9-gcc devtoolset-9-binutils devtoolset-9-runtime \
|
||||
binutils-devel bison elfutils-devel elfutils-libelf-devel \
|
||||
flex java-1.8.0-openjdk-devel newt-devel numactl-devel ncurses-devel \
|
||||
openssl-devel slang-devel systemtap-sdt-devel xz-devel zlib-devel perl-ExtUtils-Embed && \
|
||||
yum clean all && rm -rf /var/cache/yum /var/lib/rpm/__db*
|
||||
|
||||
RUN useradd builder -u 1000 -m -G users,wheel && \
|
||||
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||
echo "# macros" > /home/builder/.rpmmacros && \
|
||||
echo "%_topdir /home/builder/rpmbuild" >> /home/builder/.rpmmacros && \
|
||||
echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
mkdir -p /home/builder/rpmbuild && \
|
||||
chown -R builder /home/builder
|
||||
|
||||
USER builder
|
||||
VOLUME /home/builder
|
||||
WORKDIR /home/builder/rpmbuild
|
||||
CMD ["/bin/bash"]
|
@ -1,37 +0,0 @@
|
||||
# Dockerfile for build RPM packages.
|
||||
# Copyright (C) 2021 Teddysun <i@teddysun.com>
|
||||
|
||||
FROM --platform=${TARGETPLATFORM} centos:8
|
||||
LABEL maintainer="Teddysun <i@teddysun.com>"
|
||||
|
||||
RUN yum install -y yum-utils epel-release && \
|
||||
yum-config-manager --enable epel && \
|
||||
yum-config-manager --enable powertools && \
|
||||
rpm -e --nodeps coreutils-single && \
|
||||
yum install -y tar wget git tree gcc gcc-c++ \
|
||||
sudo net-tools make cmake zstd libzstd \
|
||||
bash coreutils diffutils patch ca-certificates \
|
||||
rpm-build rpm-devel rpmlint rpmdevtools \
|
||||
asciidoc audit-libs-devel binutils-devel flex \
|
||||
libcap-devel newt-devel pciutils-devel perl-generators \
|
||||
python3 python3-devel python3-docutils rsync xmlto bc bison \
|
||||
java-devel ncurses-devel numactl-devel openssl-devel perl-devel \
|
||||
elfutils-devel xz-devel perl-ExtUtils-Embed && \
|
||||
yum clean all && rm -rf /var/cache/dnf /var/lib/rpm/__db*
|
||||
|
||||
RUN useradd builder -u 1000 -m -G users,wheel && \
|
||||
echo "builder ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||
echo "# macros" > /home/builder/.rpmmacros && \
|
||||
echo "%_topdir /home/builder/rpmbuild" >> /home/builder/.rpmmacros && \
|
||||
echo "%_sourcedir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_builddir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_specdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_rpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
echo "%_srcrpmdir %{_topdir}" >> /home/builder/.rpmmacros && \
|
||||
mkdir -p /home/builder/rpmbuild && \
|
||||
chown -R builder /home/builder
|
||||
|
||||
USER builder
|
||||
VOLUME /home/builder
|
||||
WORKDIR /home/builder/rpmbuild
|
||||
CMD ["/bin/bash"]
|
@ -7,7 +7,6 @@ For more information on docker and containerization technologies, refer to [offi
|
||||
## Supported tags and respective `Dockerfile` links
|
||||
|
||||
- `latest`, `8` [*(Dockerfile)*][2]
|
||||
- `rockylinux`[*(Dockerfile)*][7]
|
||||
- `7` [*(Dockerfile)*][3]
|
||||
|
||||
### Reference
|
||||
@ -40,12 +39,6 @@ For CentOS 8
|
||||
$ docker pull teddysun/rpmbuild:8
|
||||
```
|
||||
|
||||
For Rockylinux 8
|
||||
|
||||
```bash
|
||||
$ docker pull teddysun/rpmbuild:rockylinux
|
||||
```
|
||||
|
||||
It can be found at [Docker Hub][6].
|
||||
|
||||
## Start a container
|
||||
@ -64,17 +57,10 @@ $ mkdir -m 777 -p /opt/builder8
|
||||
$ docker run -it --rm -h buildbot --name rpmbuild8 -v /opt/builder8:/home/builder/rpmbuild teddysun/rpmbuild:8
|
||||
```
|
||||
|
||||
There is an example to start a container for Rockylinux 8 like below:
|
||||
|
||||
```bash
|
||||
mkdir -m 777 -p /opt/rockylinux
|
||||
docker run -it --rm -h buildbot --name rockylinux8 -v /opt/rockylinux:/home/builder/rpmbuild teddysun/rpmbuild:rockylinux
|
||||
```
|
||||
|
||||
[1]: https://docs.docker.com/
|
||||
[2]: https://github.com/teddysun/across/blob/master/docker/rpmbuild/Dockerfile.centos8
|
||||
[3]: https://github.com/teddysun/across/blob/master/docker/rpmbuild/Dockerfile.centos7
|
||||
[2]: https://github.com/teddysun/across/blob/master/docker/rpmbuild/Dockerfile.rpmbuild8
|
||||
[3]: https://github.com/teddysun/across/blob/master/docker/rpmbuild/Dockerfile.rpmbuild7
|
||||
[4]: https://github.com/docker-library/official-images#architectures-other-than-amd64
|
||||
[5]: https://docs.docker.com/install/
|
||||
[6]: https://hub.docker.com/r/teddysun/rpmbuild/
|
||||
[7]: https://github.com/teddysun/across/blob/master/docker/rpmbuild/Dockerfile.rockylinux
|
||||
|
Loading…
x
Reference in New Issue
Block a user