allow way to build a local generator image instead of relying of existing one

This commit is contained in:
Andrew Camilleri 2018-09-25 10:17:55 +02:00
parent 6f2865617d
commit add439ddfa
2 changed files with 14 additions and 3 deletions

View File

@ -1,7 +1,12 @@
# This script will run docker-compose-generator in a container to generate the yml files
if (-not ($BTCPAYGEN_DOCKER_IMAGE)) { $BTCPAYGEN_DOCKER_IMAGE = "btcpayserver/docker-compose-generator" }
docker pull $BTCPAYGEN_DOCKER_IMAGE:
If (-not ($BTCPAYGEN_DOCKER_IMAGE)) { $BTCPAYGEN_DOCKER_IMAGE = "btcpayserver/docker-compose-generator" }
If($BTCPAYGEN_DOCKER_IMAGE -eq "build"){
docker build docker-compose-generator --tag build
} Else {
docker pull $BTCPAYGEN_DOCKER_IMAGE:
}
docker run -v "$(Get-Location)\Generated:/app/Generated" `
-v "$(Get-Location)\docker-compose-generator\docker-fragments:/app/docker-fragments" `
-e "BTCPAYGEN_CRYPTO1=$BTCPAYGEN_CRYPTO1" `

View File

@ -1,7 +1,13 @@
#!/bin/bash
if [ "$BTCPAYGEN_DOCKER_IMAGE" == "build" ]
then
docker build docker-compose-generator --tag build
else
docker pull ${BTCPAYGEN_DOCKER_IMAGE:-"btcpayserver/docker-compose-generator"}
fi
# This script will run docker-compose-generator in a container to generate the yml files
docker pull ${BTCPAYGEN_DOCKER_IMAGE:-"btcpayserver/docker-compose-generator"}
docker run -v "$(pwd)/Generated:/app/Generated" \
-v "$(pwd)/docker-compose-generator/docker-fragments:/app/docker-fragments" \
-e "BTCPAYGEN_CRYPTO1=$BTCPAYGEN_CRYPTO1" \