question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change way how we configure docker registries

See original GitHub issue

Today to configure custom docker registries and docker registries for aws ecr we require user to fill really tricky multi line property like:

$docker_registry_credentials = "registry1.url=my-private-registry1.com:5000
registry1.username=corp_user1
registry1.password=corp_pass1
registry2.url=my-private-registry2.com:5000
registry2.username=corp_user2
registry2.password=corp_pass2"

This approach will not work with codenvy in docker containers where we configure everything with ENV variables.

My proposal is to configure only path to the file like:

$docker_registry_credentials = "/path/to/file.properties"

Where user will define his settings according to docs, then we check if user set path to his file we will volume mount this file to our server same as we are doing for all configs.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:30 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
riuvshincommented, Nov 4, 2016

Ok It seems I’ve found a way. I figured out how to take any amount of ENV vars by contains some key and propagate those ENV vars from codenvy.env to codenvy environment file which will used by codenvy tomcat, using this way we don’t need property files at all, we configure codenvy tomcat via it own ENV vars. So in that approach user will need only add to codenvy.env ENV vars like

CODENVY_DOCKER_REGISTRY_AWS_ECR_CREDENTIALS_ID_1=id_for_resgistry1
CODENVY_DOCKER_REGISTRY_AWS_ECR_CREDENTIALS_REGION_1=region_for_resgistry1
CODENVY_DOCKER_REGISTRY_AWS_ECR_CREDENTIALS_ACCESS_KEY_ID_1=access_key_id_for_resgistry1
CODENVY_DOCKER_REGISTRY_AWS_ECR_CREDENTIALS_SECRET_ACCESS_KEY_1=secret_access_key_for_resgistry1

CODENVY_DOCKER_REGISTRY_AWS_ECR_CREDENTIALS_ID_2=id_for_resgistry2
CODENVY_DOCKER_REGISTRY_AWS_ECR_CREDENTIALS_REGION_2=region_for_resgistry2
CODENVY_DOCKER_REGISTRY_AWS_ECR_CREDENTIALS_ACCESS_KEY_ID_2=access_key_id_for_resgistry2
CODENVY_DOCKER_REGISTRY_AWS_ECR_CREDENTIALS_SECRET_ACCESS_KEY_2=secret_access_key_for_resgistry2

So using other words we will just send ENV varsf from codenvy.env to codenvy tomcat which should respect ENV vars same as a props and we are good.

I thought with puppet I can’t do that but I figured out how with Ruby injections.

WDYT guys?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring a registry - Docker Documentation
The Registry configuration is based on a YAML file, detailed below. While it comes with sane default values out of the box, you...
Read more >
How to change the default docker registry ... - Stack Overflow
The below line needs to go into the file /etc/default/docker on the host which runs the docker daemon. The change points to the...
Read more >
Docker Hub and Docker Registries Beginner's Guide - JFrog
As you might expect, since Docker Hub is Docker's official registry, it is the default registry when you install Docker. It hosts over...
Read more >
Setting up a private Docker registry - Exoscale
To improve availability, a registry would be better hosted on an external server. Let's see how to setup a private registry, and then...
Read more >
Setting Up a Private Docker Registry - InformIT
By default, “somewhere” is the Docker Hub Registry (https://hub.docker.com). However, there are ways to configure other locations from which you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found