mirror of https://github.com/apache/lucene.git
SOLR-14949: Adding githubUrl option for docker build. (#2074)
This commit is contained in:
parent
863a388fe7
commit
d65041359e
|
@ -37,6 +37,11 @@ Base Docker Image: (The docker image used for the "FROM" in the Solr Dockerfile)
|
|||
EnvVar: SOLR_DOCKER_BASE_IMAGE
|
||||
Gradle Property: -Psolr.docker.baseImage
|
||||
|
||||
Github URL or Mirror: (The URL of github or a mirror of github releases. This is of use when building the docker image behind a firewall that does not have access to external Github.)
|
||||
Default: "github.com"
|
||||
EnvVar: SOLR_DOCKER_GITHUB_URL
|
||||
Gradle Property: -Psolr.docker.githubUrl
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
|
|
|
@ -38,11 +38,12 @@ def dockerImageRepo = propertyOrEnvOrDefault("solr.docker.imageRepo", "SOLR_DOCK
|
|||
def dockerImageTag = propertyOrEnvOrDefault("solr.docker.imageTag", "SOLR_DOCKER_IMAGE_TAG", "${version}")
|
||||
def dockerImageName = propertyOrEnvOrDefault("solr.docker.imageName", "SOLR_DOCKER_IMAGE_NAME", "${dockerImageRepo}:${dockerImageTag}")
|
||||
def baseDockerImage = propertyOrEnvOrDefault("solr.docker.baseImage", "SOLR_DOCKER_BASE_IMAGE", 'openjdk:11-jre-slim')
|
||||
def githubUrlOrMirror = propertyOrEnvOrDefault("solr.docker.githubUrl", "SOLR_DOCKER_GITHUB_URL", 'github.com')
|
||||
|
||||
docker {
|
||||
name = dockerImageName
|
||||
files file('include')
|
||||
buildArgs(['BASE_IMAGE' : baseDockerImage, 'SOLR_PACKAGE_IMAGE' : 'apache/solr-build:local-package', 'SOLR_VERSION': "${version}"])
|
||||
buildArgs(['BASE_IMAGE' : baseDockerImage, 'SOLR_PACKAGE_IMAGE' : 'apache/solr-build:local-package', 'SOLR_VERSION': "${version}", 'GITHUB_URL': githubUrlOrMirror])
|
||||
}
|
||||
|
||||
tasks.docker {
|
||||
|
|
Loading…
Reference in New Issue