Modify Dockerfile for docker hub building (#130)

* Modify builds for docker hub

* Cosmetic modify

* Cosmetic modify

* Modify build file

* Cosmetic modify
This commit is contained in:
Sergey Kirichenko 2021-08-31 16:33:39 +03:00 committed by GitHub
parent 38899cbce3
commit 7168d34038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 9 deletions

3
.env Normal file
View File

@ -0,0 +1,3 @@
REPO=onlyoffice4ami
STATUS=''
TAG=latest

View File

@ -1,8 +0,0 @@
FROM onlyoffice4ami/communityserver:latest
ARG APPSETTING_CONFIG=/var/www/onlyoffice/WebStudio/web.appsettings.config
RUN xmlstarlet ed -L \
-s "/appSettings" -t elem -n "add" \
-i "/appSettings/add[not(@*)]" -t attr -n "key" -v "web.ami.meta" \
-i "/appSettings/add[@key='web.ami.meta']" -t attr -n "value" -v "http://100.100.100.200/latest/meta-data/" \
$APPSETTING_CONFIG

View File

@ -1,4 +1,4 @@
FROM onlyoffice/communityserver:latest
FROM onlyoffice/communityserver:latest AS communityserver-ami
ARG APPSETTING_CONFIG=/var/www/onlyoffice/WebStudio/web.appsettings.config
RUN apt-get -y update && \
@ -26,3 +26,12 @@ RUN xmlstarlet ed -L \
-i "/appSettings/add[not(@*)]" -t attr -n "key" -v "web.hide-settings" \
-i "/appSettings/add[@key='web.hide-settings']" -t attr -n "value" -v "VersionSettings,Monitoring,PublicPortal,PortalRename,Migration,Promocode,TariffSettings,ProxyHttpContent,MailService,FullTextSearch,Storage,EncryptionSettings" \
$APPSETTING_CONFIG
FROM communityserver-ami AS communityserver-alc
ARG APPSETTING_CONFIG=/var/www/onlyoffice/WebStudio/web.appsettings.config
RUN xmlstarlet ed -L \
-s "/appSettings" -t elem -n "add" \
-i "/appSettings/add[not(@*)]" -t attr -n "key" -v "web.ami.meta" \
-i "/appSettings/add[@key='web.ami.meta']" -t attr -n "value" -v "http://100.100.100.200/latest/meta-data/" \
$APPSETTING_CONFIG

16
build.yml Normal file
View File

@ -0,0 +1,16 @@
version: "3.6"
services:
onlyoffice-communityserver-ami:
build:
context: ./
dockerfile: Dockerfile.ami
target: communityserver-ami
image: "${REPO}/${STATUS}communityserver:${TAG}"
onlyoffice-communityserver-alc:
build:
context: ./
dockerfile: Dockerfile.ami
target: communityserver-alc
image: "${REPO}/${STATUS}communityserver:${TAG}-alc"

3
hooks/build Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
export TAG=$DOCKER_TAG
docker-compose -f ${BUILD_FILE}.yml build

3
hooks/push Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
export TAG=$DOCKER_TAG
docker-compose -f ${BUILD_FILE}.yml push