docker - Download secure files doesn't download files - Stack Overflow

I am currently working on a CI Pipeline to create and sign docker images; I uploaded the delegated key

I am currently working on a CI Pipeline to create and sign docker images; I uploaded the delegated key for signing to GitLab. During the pipeline, I use download secure file to retrieve the file. My problem now is that, as you can see below, the script reports that it has downloaded the key /var/certs/, but after using a ls on the directory, the file is not there.

Before, I had already tried to store the key inside a VARIABLE and use echo to write the content in the file, but there I lost the new lines, which docker trust doesn't like. I also tried running on moving the repository to gitlab, because I wasn't sure if the Server of my university is up to date, but the execution still fails.

Below, you will see the deployment stage of the pipeline.

deploy:
  stage: deploy
  image: docker:latest
  services:
    - docker:latest
  variables:
    SECURE_FILES_DOWNLOAD_PATH: '/var/certs'
  only:
    - master
  script:
    - apk update
    - apk add curl
    - apk add bash
    - curl --silent "; | bash
    - ls -la /var/certs/
    - ls -la .secure_files/
    - echo $SIGNING_KEY_PASSWORD | docker trust key load /var/certs/10505ee4d3913ea70a8d69e19df1a59dc5af99920f9ba4a1b11714b383da4a00.key --name gitlab
    # 'docker info' command is used to debug the job.
    - docker info

My command to start the gitlab runner is the followin.

sudo gitlab-runner register -n  --url "/"  --registration-token TOKEN  --executor docker --description "My Docker Runner"  --docker-image "docker:24.0.5"  --docker-privileged

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742318422a4421311.html

相关推荐

  • docker - Download secure files doesn't download files - Stack Overflow

    I am currently working on a CI Pipeline to create and sign docker images; I uploaded the delegated key

    11小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信