Skip to content

How to create certificates? #1

Description

@iBobik

Hi,
I just copied certificates and keys created by my local docker-machine create, but it seems it can not be created this way.

When I tried to use it in GitLab CI like this:

review:
  image: raketenbasis/docker-machine
  stage: review
  script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
…

It just printed this errors:

To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env default
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "example.com:2376": x509: certificate is valid for localhost, not example.com
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.

$ docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
section_end:1509531912:build_script
section_start:1509531912:after_script
Host already exists: "default"
section_end:1509531915:after_script
ERROR: Job failed: exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions