主要步骤
docker login hub.ucloudadmin.com
docker buildx build --platform linux/amd64 -t hub.ucloudadmin.com/uphost-sre/alpline-cicd:v0.1.6 .
docker push hub.ucloudadmin.com/uphost-sre/alpline-cicd:v0.1.6
dockerfile
➜ docker-images cat Dockerfile
FROM python:3.8-alpine
LABEL maintainer="wood.wang <wood.wang@ucloud.cn>"
ENV LANG="C.UTF-8" \
TZ="Asia/Shanghai" \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk add --no-cache curl \
git \
p7zip \
openssh-client \
bash \
bash-doc \
bash-completion \
&& pip install --no-cache -i http://pypi.douban.com/simple requests --trusted-host pypi.douban.com \
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo "${TZ}" > /etc/timezone
网友评论