diff --git a/README.md b/README.md index 3eb5dee..0505b56 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ From now on use rancherize without other dependencies for your local environment # Usage in build tools With build tools like jenkins or gitlab-ci, you cannot rely on the presence of a .rancherize file in the home-dir. For this usecase you can set account settings with environment variables on the [docker container](https://hub.docker.com/r/ipunktbs/rancherize/) on runtime. best practise would be to include these variables via secrets. +- `DOCKER_SERVER` - registry server (e.g. registry.gitlab.com), ignore or leave empty for dockerhub - `DOCKER_USER` - username for dockerhub / registry - `DOCKER_PASSWORD` - password for dockerhub / registry - `DOCKER_ECR` - true if using [AWS ECR](https://aws.amazon.com/ecr/) diff --git a/app/EnvironmentAccessConfig/DockerAccessEnvironmentService.php b/app/EnvironmentAccessConfig/DockerAccessEnvironmentService.php index d04c3e2..57865f0 100644 --- a/app/EnvironmentAccessConfig/DockerAccessEnvironmentService.php +++ b/app/EnvironmentAccessConfig/DockerAccessEnvironmentService.php @@ -61,9 +61,10 @@ public function getAccount(string $name) : DockerAccount { public function parse( Configuration $configuration ) { $this->account = [ 'user' => getenv('DOCKER_USER'), + 'server' => getenv('DOCKER_SERVER') ?: '', 'password' => getenv('DOCKER_PASSWORD'), 'ecr' => getenv('DOCKER_ECR') ?: false ]; } -} \ No newline at end of file +}