euleros-hw_0.1.0.dockerfile
如下
# docker build -f euleros-hw_0.1.0.dockerfile -t euleros-hw:0.1.0 ./
FROM euleros:2.0.8 as build0
RUN sed -i 's/SP3/SP8/g' /etc/yum.repos.d/euleros.repo && \
sed -i 's#2.8/os//$#2.8/os/\$basearch/#g' /etc/yum.repos.d/euleros.repo
RUN rm -fr /etc/yum.repos.d/* && \
echo '[base]' > /etc/yum.repos.d/EulerOS.repo && \
echo 'name=EulerOS-2.0SP8 base' >> /etc/yum.repos.d/EulerOS.repo && \
echo 'baseurl=http://developer.huawei.com/ict/site-euleros/euleros/repo/yum/2.8/os/aarch64/' >> /etc/yum.repos.d/EulerOS.repo && \
echo 'enabled=1' >> /etc/yum.repos.d/EulerOS.repo && \
echo 'gpgcheck=1' >> /etc/yum.repos.d/EulerOS.repo && \
echo 'gpgkey=http://developer.huawei.com/ict/site-euleros/euleros/repo/yum/2.8/os/RPM-GPG-KEY-EulerOS' >> /etc/yum.repos.d/EulerOS.repo && \
yum makecache
RUN yum -y update &&\
yum -y install vi wget curl net-tools findutils tar xz && \
yum clean all && rm -fr /tmp/* && rm -fr /var/cache/*
FROM scratch
COPY --from=build0 / /
来源:oschina
链接:https://my.oschina.net/mengyoufengyu/blog/3188841