More secure approach to docker login

This commit is contained in:
Adrien Ferrand 2018-09-16 22:23:24 +02:00
parent 6b4b32e0f2
commit ac8a7b68ea

View File

@ -26,7 +26,7 @@ jobs:
docker load < /tmp/workspace/docker-backuppc.tar docker load < /tmp/workspace/docker-backuppc.tar
- run: - run:
command: command:
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} echo "${DOCKER_PASS}" | docker login -u ${DOCKER_USER} --password-stdin
- deploy: - deploy:
command: | command: |
if [ ${CIRCLE_BRANCH} = master ]; then DOCKER_TAG=latest; else DOCKER_TAG=${CIRCLE_TAG:-${CIRCLE_BRANCH}}; fi if [ ${CIRCLE_BRANCH} = master ]; then DOCKER_TAG=latest; else DOCKER_TAG=${CIRCLE_TAG:-${CIRCLE_BRANCH}}; fi