forked from zendesk/samson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request zendesk#675 from zendesk/shender/docker_hub_compat…
…ibility Make compatible with main docker hub registry.
- Loading branch information
Showing
3 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
require 'docker' | ||
|
||
if ENV['DOCKER_URL'].present? && !Rails.env.test? && !ENV['PRECOMPILE'] | ||
Docker.url = ENV['DOCKER_URL'] | ||
Docker.options = { read_timeout: 600 } | ||
|
||
# Confirm the Docker daemon is a recent enough version | ||
Docker.validate_version! | ||
end | ||
if !Rails.env.test? && !ENV['PRECOMPILE'] | ||
if ENV['DOCKER_URL'].present? | ||
Docker.url = ENV['DOCKER_URL'] | ||
Docker.options = { read_timeout: 600 } | ||
|
||
# Confirm the Docker daemon is a recent enough version | ||
Docker.validate_version! | ||
end | ||
|
||
if ENV['DOCKER_FEATURE'] && !ENV['DOCKER_REGISTRY'].present? | ||
puts '*** DOCKER_REGISTRY environment variable must be configured when DOCKER_FEATURE is enabled ***' | ||
exit(1) | ||
if ENV['DOCKER_FEATURE'] && !ENV['DOCKER_REGISTRY'].present? | ||
puts '*** DOCKER_REGISTRY environment variable must be configured when DOCKER_FEATURE is enabled ***' | ||
exit(1) | ||
end | ||
end |