Skip to content

Commit 603a10f

Browse files
eryajferyajf
authored andcommitted
build: 优化docker登录方式,使用更安全的--password-stdin参数
1 parent a53b5ce commit 603a10f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.cnb/workflows/build-docker-images.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ main:
1414
stages:
1515
- name: 🐋 推送镜像
1616
script: |
17-
docker login -u ${DOCKERHUB_USERNAME} -p ${DOCKERHUB_TOKEN}
18-
docker login -u ${ALIHUB_USERNAME} -p ${ALIHUB_TOKEN} ${ALIHUB_URL}
17+
echo ${DOCKERHUB_TOKEN} | docker login -u ${DOCKERHUB_USERNAME} --password-stdin
18+
echo ${ALIHUB_TOKEN} | docker login -u ${ALIHUB_USERNAME} --password-stdin ${ALIHUB_URL}
1919
docker run -d --name buildkitd \
2020
--security-opt seccomp=unconfined \
2121
--security-opt apparmor=unconfined \

0 commit comments

Comments
 (0)