Use ARG to set up documentserver repo
This commit is contained in:
parent
4236d71fe3
commit
5ef37630c5
2 changed files with 6 additions and 4 deletions
|
@ -1,6 +1,8 @@
|
||||||
FROM ubuntu:14.04
|
FROM ubuntu:14.04
|
||||||
MAINTAINER Ascensio System SIA <support@onlyoffice.com>
|
MAINTAINER Ascensio System SIA <support@onlyoffice.com>
|
||||||
|
|
||||||
|
ARG REPO_URL="deb http://static.teamlab.com/repo/debian/ squeeze main"
|
||||||
|
|
||||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive
|
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
|
@ -34,7 +36,7 @@ ADD run-document-server.sh /app/onlyoffice/run-document-server.sh
|
||||||
|
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|
||||||
RUN echo "deb http://repo-doc-onlyoffice-com.s3.amazonaws.com/ubuntu/trusty/onlyoffice-documentserver/{{GIT_BRANCH}}/{{PACKAGE_VERSION}}/ repo/" | tee /etc/apt/sources.list.d/onlyoffice.list && \
|
RUN echo "$REPO_URL" | tee /etc/apt/sources.list.d/onlyoffice.list && \
|
||||||
apt-get -y update && \
|
apt-get -y update && \
|
||||||
service postgresql start && \
|
service postgresql start && \
|
||||||
apt-get --force-yes -yq install onlyoffice-documentserver && \
|
apt-get --force-yes -yq install onlyoffice-documentserver && \
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -1,5 +1,7 @@
|
||||||
PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER)
|
PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER)
|
||||||
|
|
||||||
|
REPO_URL := "deb http://repo-doc-onlyoffice-com.s3.amazonaws.com/ubuntu/trusty/onlyoffice-documentserver/$(GIT_BRANCH)/$(PACKAGE_VERSION)/ repo/"
|
||||||
|
|
||||||
ifeq ($(GIT_BRANCH), origin/develop)
|
ifeq ($(GIT_BRANCH), origin/develop)
|
||||||
DOCKER_TAGS += $(subst -,.,$(PACKAGE_VERSION))
|
DOCKER_TAGS += $(subst -,.,$(PACKAGE_VERSION))
|
||||||
DOCKER_TAGS += latest
|
DOCKER_TAGS += latest
|
||||||
|
@ -15,10 +17,8 @@ DOCKER_TARGETS := $(foreach TAG,$(DOCKER_TAGS),$(DOCKER_REPO)$(COLON)$(TAG))
|
||||||
.PHONY: all clean clean-docker deploy docker
|
.PHONY: all clean clean-docker deploy docker
|
||||||
|
|
||||||
$(DOCKER_TARGETS): $(DEB_REPO_DATA)
|
$(DOCKER_TARGETS): $(DEB_REPO_DATA)
|
||||||
sed "s|{{GIT_BRANCH}}|$(GIT_BRANCH)|" -i Dockerfile
|
|
||||||
sed 's/{{PACKAGE_VERSION}}/'$(PACKAGE_VERSION)'/' -i Dockerfile
|
|
||||||
|
|
||||||
sudo docker build -t $(subst $(COLON),:,$@) . &&\
|
sudo docker build --build-arg REPO_URL=$(REPO_URL) -t $(subst $(COLON),:,$@) . &&\
|
||||||
mkdir -p $$(dirname $@) &&\
|
mkdir -p $$(dirname $@) &&\
|
||||||
echo "Done" > $@
|
echo "Done" > $@
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue