mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed issue #4884, osbase/osadmin image support amd64/arm64
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
FROM canal/osbase:v1
|
||||
|
||||
MAINTAINER agapple (jianghang115@gmail.com)
|
||||
|
||||
RUN \
|
||||
groupadd -r mysql && useradd -r -g mysql mysql && \
|
||||
yum -y install wget mysql-server --nogpgcheck && \
|
||||
yum clean all && \
|
||||
true
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
@@ -1,11 +0,0 @@
|
||||
FROM canal/osbase:v1
|
||||
|
||||
MAINTAINER agapple (jianghang115@gmail.com)
|
||||
|
||||
env NODE_EPORTER_LINK="https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-arm64.tar.gz"
|
||||
|
||||
RUN \
|
||||
wget "$NODE_EPORTER_LINK" -O /tmp/node_exporter.tar.gz && \
|
||||
true
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
6
docker/base/README.md
Normal file
6
docker/base/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
# osbase
|
||||
cd amd64 && docker build --no-cache -t canal/osbase ./ -f Dockerfile
|
||||
|
||||
# osadmin
|
||||
cd amd64 && docker build --no-cache -t canal/osadmin ./ -f ./Dockerfile_admin
|
||||
62
docker/base/amd64/Dockerfile
Normal file
62
docker/base/amd64/Dockerfile
Normal file
@@ -0,0 +1,62 @@
|
||||
# amd64
|
||||
FROM centos:centos7.9.2009@sha256:dead07b4d8ed7e29e98de0f4504d87e8880d4347859d839686a31da35a3b532f
|
||||
# arm64
|
||||
#FROM centos:centos7.9.2009@sha256:73f11afcbb50d8bc70eab9f0850b3fa30e61a419bc48cf426e63527d14a8373b
|
||||
|
||||
ARG jdk_rpm
|
||||
ARG platform_env
|
||||
|
||||
MAINTAINER agapple (jianghang115@gmail.com)
|
||||
# env DOWNLOAD_AMD_LINK="https://download.oracle.com/otn/java/jdk/8u361-b09/0ae14417abb444ebb02b9815e2103550/jdk-8u361-linux-x64.rpm"
|
||||
# env DOWNLOAD_ARM_LINK="https://download.oracle.com/otn/java/jdk/8u361-b09/0ae14417abb444ebb02b9815e2103550/jdk-8u361-linux-aarch64.rpm"
|
||||
env NODE_EPORTER_LINK="https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz"
|
||||
|
||||
# install system
|
||||
# update yum config, fix "centos6.x yum install failure && Determining fastest mirrors slow" problems
|
||||
COPY yum/ /tmp/
|
||||
RUN \
|
||||
/bin/cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak && \
|
||||
/bin/cp -f /tmp/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo && \
|
||||
/bin/cp /etc/yum/pluginconf.d/fastestmirror.conf /etc/yum/pluginconf.d/fastestmirror.conf.bak && \
|
||||
awk '{ if($0=="enabled=1"){print "enabled=0";} else{print $0;} }' /etc/yum/pluginconf.d/fastestmirror.conf.bak > /etc/yum/pluginconf.d/fastestmirror.conf && \
|
||||
/bin/cp /etc/yum.conf /etc/yum.conf.bak && \
|
||||
echo 'minrate=1' >> /etc/yum.conf && echo 'timeout=600' >> /etc/yum.conf && \
|
||||
yum clean all && yum makecache
|
||||
|
||||
RUN \
|
||||
/bin/cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||
echo 'root:Hello1234' | chpasswd && \
|
||||
groupadd -r admin && useradd -g admin admin && \
|
||||
yum install -y man && \
|
||||
yum install -y dstat && \
|
||||
yum install -y unzip && \
|
||||
yum install -y nc && \
|
||||
yum install -y openssh-server && \
|
||||
yum install -y tar && \
|
||||
yum install -y which && \
|
||||
yum install -y wget && \
|
||||
yum install -y perl && \
|
||||
yum install -y file && \
|
||||
ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key && \
|
||||
ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key && \
|
||||
sed -ri 's/session required pam_loginuid.so/#session required pam_loginuid.so/g' /etc/pam.d/sshd && \
|
||||
sed -i -e 's/^#Port 22$/Port 2222/' /etc/ssh/sshd_config && \
|
||||
mkdir -p /root/.ssh && chown root.root /root && chmod 700 /root/.ssh && \
|
||||
yum install -y cronie && \
|
||||
sed -i '/session required pam_loginuid.so/d' /etc/pam.d/crond && \
|
||||
true
|
||||
|
||||
COPY ${jdk_rpm} /tmp/
|
||||
RUN \
|
||||
touch /var/lib/rpm/* && \
|
||||
#if [ "$BUILDPLATFORM" == "linux/amd64" ] ; then wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie" "$DOWNLOAD_AMD_LINK" -O /tmp/jdk-8-linux.rpm ; fi && \
|
||||
#if [ "$BUILDPLATFORM" == "linux/arm64" ] ; then wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie" "$DOWNLOAD_ARM_LINK" -O /tmp/jdk-8-linux.rpm ; fi && \
|
||||
yum -y install /tmp/jdk-*.rpm && \
|
||||
/bin/rm -f /tmp/jdk-*.rpm && \
|
||||
echo "export JAVA_HOME=/usr/java/latest" >> /etc/profile && \
|
||||
echo "export PATH=\$JAVA_HOME/bin:\$PATH" >> /etc/profile && \
|
||||
wget "$NODE_EPORTER_LINK" -O /tmp/node_exporter.tar.gz && \
|
||||
yum clean all && \
|
||||
true
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
14
docker/base/amd64/Dockerfile_admin
Normal file
14
docker/base/amd64/Dockerfile_admin
Normal file
@@ -0,0 +1,14 @@
|
||||
# amd64
|
||||
FROM canal/osbase:v3-amd64
|
||||
|
||||
MAINTAINER agapple (jianghang115@gmail.com)
|
||||
|
||||
RUN \
|
||||
groupadd -r mysql && useradd -r -g mysql mysql && \
|
||||
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm && \
|
||||
rpm -ivh mysql80-community-release-el7-3.noarch.rpm && \
|
||||
yum install mysql-community-server --nogpgcheck -y && \
|
||||
yum clean all && \
|
||||
true
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
43
docker/base/amd64/yum/CentOS-Base.repo
Normal file
43
docker/base/amd64/yum/CentOS-Base.repo
Normal file
@@ -0,0 +1,43 @@
|
||||
# CentOS-Base.repo
|
||||
#
|
||||
# The mirror system uses the connecting IP address of the client and the
|
||||
# update status of each mirror to pick mirrors that are updated to and
|
||||
# geographically close to the client. You should use this for CentOS updates
|
||||
# unless you are manually picking other mirrors.
|
||||
#
|
||||
# If the mirrorlist= does not work for you, as a fall back you can try the
|
||||
# remarked out baseurl= line instead.
|
||||
#
|
||||
#
|
||||
|
||||
[base]
|
||||
name=CentOS-7 - Base
|
||||
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=os&infra=$infra
|
||||
#baseurl=http://mirror.centos.org/centos/7/os/$basearch/
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
||||
|
||||
#released updates
|
||||
[updates]
|
||||
name=CentOS-7 - Updates
|
||||
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=updates&infra=$infra
|
||||
#baseurl=http://mirror.centos.org/centos/7/updates/$basearch/
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
||||
|
||||
#additional packages that may be useful
|
||||
[extras]
|
||||
name=CentOS-7 - Extras
|
||||
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=extras&infra=$infra
|
||||
#baseurl=http://mirror.centos.org/centos/7/extras/$basearch/
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
||||
|
||||
#additional packages that extend functionality of existing packages
|
||||
[centosplus]
|
||||
name=CentOS-7 - Plus
|
||||
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=centosplus&infra=$infra
|
||||
#baseurl=http://mirror.centos.org/centos/7/centosplus/$basearch/
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
||||
@@ -1,10 +1,15 @@
|
||||
FROM centos:centos6.10
|
||||
# arm64
|
||||
FROM centos:centos7.9.2009@sha256:73f11afcbb50d8bc70eab9f0850b3fa30e61a419bc48cf426e63527d14a8373b
|
||||
|
||||
ARG jdk_rpm
|
||||
ARG platform_env
|
||||
|
||||
MAINTAINER agapple (jianghang115@gmail.com)
|
||||
# env DOWNLOAD_AMD_LINK="https://download.oracle.com/otn/java/jdk/8u361-b09/0ae14417abb444ebb02b9815e2103550/jdk-8u361-linux-x64.rpm"
|
||||
# env DOWNLOAD_ARM_LINK="https://download.oracle.com/otn/java/jdk/8u361-b09/0ae14417abb444ebb02b9815e2103550/jdk-8u361-linux-aarch64.rpm"
|
||||
env NODE_EPORTER_LINK="https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-arm64.tar.gz"
|
||||
|
||||
env DOWNLOAD_LINK="https://download.oracle.com/otn-pub/java/jdk/8u281-b09/89d678f2be164786b292527658ca1605/jdk-8u281-linux-x64.rpm"
|
||||
# install system
|
||||
|
||||
# update yum config, fix "centos6.x yum install failure && Determining fastest mirrors slow" problems
|
||||
COPY yum/ /tmp/
|
||||
RUN \
|
||||
@@ -39,13 +44,14 @@ RUN \
|
||||
sed -i '/session required pam_loginuid.so/d' /etc/pam.d/crond && \
|
||||
true
|
||||
|
||||
COPY ${jdk_rpm} /tmp/
|
||||
RUN \
|
||||
touch /var/lib/rpm/* && \
|
||||
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie" "$DOWNLOAD_LINK" -O /tmp/jdk-8-linux-x64.rpm && \
|
||||
yum -y install /tmp/jdk-8-linux-x64.rpm && \
|
||||
/bin/rm -f /tmp/jdk-8-linux-x64.rpm && \
|
||||
touch /var/lib/rpm/* && \
|
||||
yum -y install /tmp/jdk-*.rpm && \
|
||||
/bin/rm -f /tmp/jdk-*.rpm && \
|
||||
echo "export JAVA_HOME=/usr/java/latest" >> /etc/profile && \
|
||||
echo "export PATH=\$JAVA_HOME/bin:\$PATH" >> /etc/profile && \
|
||||
wget "$NODE_EPORTER_LINK" -O /tmp/node_exporter.tar.gz && \
|
||||
yum clean all && \
|
||||
true
|
||||
|
||||
14
docker/base/arm64/Dockerfile_admin
Normal file
14
docker/base/arm64/Dockerfile_admin
Normal file
@@ -0,0 +1,14 @@
|
||||
# arm64
|
||||
FROM canal/osbase:v3-arm64
|
||||
|
||||
MAINTAINER agapple (jianghang115@gmail.com)
|
||||
|
||||
RUN \
|
||||
groupadd -r mysql && useradd -r -g mysql mysql && \
|
||||
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm && \
|
||||
rpm -ivh mysql80-community-release-el7-3.noarch.rpm && \
|
||||
yum install mysql-community-server --nogpgcheck -y && \
|
||||
yum clean all && \
|
||||
true
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
48
docker/base/arm64/yum/CentOS-Base.repo
Normal file
48
docker/base/arm64/yum/CentOS-Base.repo
Normal file
@@ -0,0 +1,48 @@
|
||||
# CentOS-Base.repo
|
||||
#
|
||||
# The mirror system uses the connecting IP address of the client and the
|
||||
# update status of each mirror to pick mirrors that are updated to and
|
||||
# geographically close to the client. You should use this for CentOS updates
|
||||
# unless you are manually picking other mirrors.
|
||||
#
|
||||
# If the mirrorlist= does not work for you, as a fall back you can try the
|
||||
# remarked out baseurl= line instead.
|
||||
#
|
||||
#
|
||||
|
||||
[base]
|
||||
name=CentOS-$releasever - Base
|
||||
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
|
||||
#baseurl=http://mirror.centos.org/altarch/$releasever/os/$basearch/
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
||||
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
|
||||
|
||||
#released updates
|
||||
[updates]
|
||||
name=CentOS-$releasever - Updates
|
||||
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
|
||||
#baseurl=http://mirror.centos.org/altarch/$releasever/updates/$basearch/
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
||||
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
|
||||
|
||||
#additional packages that may be useful
|
||||
[extras]
|
||||
name=CentOS-$releasever - Extras
|
||||
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
|
||||
#baseurl=http://mirror.centos.org/altarch/$releasever/extras/$basearch/
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
||||
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
|
||||
enabled=1
|
||||
|
||||
#additional packages that extend functionality of existing packages
|
||||
[centosplus]
|
||||
name=CentOS-$releasever - Plus
|
||||
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
|
||||
#baseurl=http://mirror.centos.org/altarch/$releasever/centosplus/$basearch/
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
|
||||
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64
|
||||
@@ -1,66 +0,0 @@
|
||||
# CentOS-Base.repo
|
||||
#
|
||||
# The mirror system uses the connecting IP address of the client and the
|
||||
# update status of each mirror to pick mirrors that are updated to and
|
||||
# geographically close to the client. You should use this for CentOS updates
|
||||
# unless you are manually picking other mirrors.
|
||||
#
|
||||
# If the mirrorlist= does not work for you, as a fall back you can try the
|
||||
# remarked out baseurl= line instead.
|
||||
#
|
||||
|
||||
[base]
|
||||
name=CentOS-$releasever - Base
|
||||
failovermethod=priority
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
|
||||
baseurl=https://mirrors.aliyun.com/centos-vault/centos/$releasever/os/$basearch/
|
||||
https://mirrors.cloud.tencent.com/centos/$releasever/os/$basearch/
|
||||
https://vault.centos.org/centos/$releasever/os/$basearch/
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||
|
||||
#released updates
|
||||
[updates]
|
||||
name=CentOS-$releasever - Updates
|
||||
failovermethod=priority
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
|
||||
baseurl=https://mirrors.aliyun.com/centos-vault/centos/$releasever/updates/$basearch/
|
||||
https://mirrors.cloud.tencent.com/centos/$releasever/updates/$basearch/
|
||||
https://vault.centos.org/centos/$releasever/updates/$basearch/
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||
|
||||
#additional packages that may be useful
|
||||
[extras]
|
||||
name=CentOS-$releasever - Extras
|
||||
failovermethod=priority
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
|
||||
baseurl=https://mirrors.aliyun.com/centos-vault/centos/$releasever/extras/$basearch/
|
||||
https://mirrors.cloud.tencent.com/centos/$releasever/extras/$basearch/
|
||||
https://vault.centos.org/centos/$releasever/extras/$basearch/
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||
|
||||
#additional packages that extend functionality of existing packages
|
||||
[centosplus]
|
||||
name=CentOS-$releasever - Plus
|
||||
failovermethod=priority
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
|
||||
baseurl=https://mirrors.aliyun.com/centos-vault/centos/$releasever/centosplus/$basearch/
|
||||
https://mirrors.cloud.tencent.com/centos/6.0/centosplus/$basearch/
|
||||
https://vault.centos.org/centos/$releasever/centosplus/$basearch/
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||
|
||||
#contrib - packages by Centos Users
|
||||
[contrib]
|
||||
name=CentOS-$releasever - Contrib
|
||||
failovermethod=priority
|
||||
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib&infra=$infra
|
||||
baseurl=https://mirrors.aliyun.com/centos-vault/centos/$releasever/contrib/$basearch/
|
||||
https://mirrors.cloud.tencent.com/centos/$releasever/contrib/$basearch/
|
||||
https://vault.centos.org/centos/$releasever/contrib/$basearch/
|
||||
gpgcheck=1
|
||||
enabled=0
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
||||
Reference in New Issue
Block a user