Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #74 from ipunkt/justb81-docker-server
Browse files Browse the repository at this point in the history
Implement DOCKER_SERVER environment
  • Loading branch information
justb81 authored Nov 8, 2017
2 parents e515dee + 6bab1bc commit 7de92c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
];
}

}
}

0 comments on commit 7de92c4

Please sign in to comment.