mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-07 07:56:12 +00:00
make it possible to build official kopano releases
Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
parent
12eb0daddc
commit
119826e180
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
||||
*.yml
|
||||
docker-compose.yml
|
||||
data/*
|
||||
env
|
||||
|
17
Makefile
17
Makefile
@ -9,13 +9,28 @@ core_download_version = $(shell ./version.sh core)
|
||||
webapp_version = $(shell docker run --rm $(docker_repo)/kopano_webapp cat /kopano/buildversion | tail -n 1 | grep -o -P '(?<=-).*(?=\+)')
|
||||
webapp_download_version = $(shell ./version.sh webapp)
|
||||
|
||||
KOPANO_CORE_REPOSITORY_URL := file:/kopano/repo/core
|
||||
KOPANO_WEBAPP_REPOSITORY_URL := file:/kopano/repo/webapp
|
||||
RELEASE_KEY_DOWNLOAD := 0
|
||||
DOWNLOAD_COMMUNITY_PACKAGES := 1
|
||||
|
||||
include env
|
||||
export
|
||||
|
||||
# convert lowercase componentname to uppercase
|
||||
COMPONENT = $(shell echo $(component) | tr a-z A-Z)
|
||||
|
||||
build-all: build-ssl build-base build-core build-webapp
|
||||
|
||||
build: component ?= base
|
||||
build:
|
||||
docker build --build-arg KOPANO_$(COMPONENT)_VERSION=${$(component)_download_version} -t $(docker_repo)/kopano_$(component) $(component)/
|
||||
docker build \
|
||||
--build-arg KOPANO_$(COMPONENT)_VERSION=${$(component)_download_version} \
|
||||
--build-arg KOPANO_CORE_REPOSITORY_URL=$(KOPANO_CORE_REPOSITORY_URL) \
|
||||
--build-arg KOPANO_WEBAPP_REPOSITORY_URL=$(KOPANO_WEBAPP_REPOSITORY_URL) \
|
||||
--build-arg RELEASE_KEY_DOWNLOAD=$(RELEASE_KEY_DOWNLOAD) \
|
||||
--build-arg DOWNLOAD_COMMUNITY_PACKAGES=$(DOWNLOAD_COMMUNITY_PACKAGES) \
|
||||
-t $(docker_repo)/kopano_$(component) $(component)/
|
||||
|
||||
build-base:
|
||||
component=base make build
|
||||
|
@ -3,7 +3,8 @@
|
||||
New instructions:
|
||||
|
||||
- explain Makefile
|
||||
- `make docker_repo=kopano build-all` to upload to a custom docker hub account
|
||||
- `make docker_repo=kopano publish` to upload to a custom docker hub account
|
||||
|
||||
|
||||
## Getting started with docker-compose
|
||||
|
||||
|
5
env-example
Normal file
5
env-example
Normal file
@ -0,0 +1,5 @@
|
||||
# modify below to build a different version, than the kopano nightly release
|
||||
KOPANO_CORE_REPOSITORY_URL=https://serial:xxxx@download.kopano.io/supported/core:/final/Debian_9.0/
|
||||
KOPANO_WEBAPP_REPOSITORY_URL=https://serial:xxxx@download.kopano.io/supported/webapp:/final/Debian_9.0/
|
||||
RELEASE_KEY_DOWNLOAD=1
|
||||
DOWNLOAD_COMMUNITY_PACKAGES=0
|
20
version.sh
20
version.sh
@ -8,6 +8,26 @@ source base/create-kopano-repo.sh
|
||||
|
||||
component=${1:-core}
|
||||
|
||||
if [ -e ./env ]; then
|
||||
source ./env
|
||||
fi
|
||||
KOPANO_CORE_REPOSITORY_URL=${KOPANO_CORE_REPOSITORY_URL:-""}
|
||||
KOPANO_WEBAPP_REPOSITORY_URL=${KOPANO_WEBAPP_REPOSITORY_URL:-""}
|
||||
|
||||
if [[ $KOPANO_CORE_REPOSITORY_URL == http* ]] || [[ $KOPANO_WEBAPP_REPOSITORY_URL == http* ]]; then
|
||||
case $component in
|
||||
core)
|
||||
version=$(curl -s -S -L $KOPANO_CORE_REPOSITORY_URL/Packages | grep -A2 "Package: kopano-server-packages")
|
||||
echo "${version##* }"
|
||||
;;
|
||||
webapp)
|
||||
version=$(curl -s -S -L $KOPANO_WEBAPP_REPOSITORY_URL/Packages | grep -m1 -A1 "Package: kopano-webapp")
|
||||
echo "${version##* }"
|
||||
;;
|
||||
esac
|
||||
exit
|
||||
fi
|
||||
|
||||
# query community server by h5ai API
|
||||
filename=$(h5ai_query "$component")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user