Public Repository

Last pushed: 2 years ago
Short Description
Non-root installation of Google Apps Directory Sync (GADS) 3.2.1 on ubuntu:14.04
Full Description

Google Apps Directory Sync (GADS) 3.2.1 is downloaded and deployed in /home/gads/GoogleAppsDirectorySync

The conf and log directories should be mapped from the host machine.

Strong limitation: the encryted password in the gads xml configuration file are invalidated at each start since the machine sounds different each time
This force us to run "make bash" then updated all encrypted passwords in the xml conf, using the encrypt-util tool....

Exemple of Makefile to build, start etc the container

######################################## 
# Makefile for docker image management
######################################## 

DOCKER_CMD=sudo docker
DOCKER_TAG=bernigaud/gads
DOCKER_NAME=gads

# full paths in -v
# --rm to delete containers on exit
DOCKER_RUN_PARAMS= --rm -v /home/stef/dev/docker/gads/conf:/home/gads/conf -v /home/stef/dev/docker/gads/log:/home/gads/log --name $(DOCKER_NAME)

# full paths
GADS_XML_CONF_FILE=/home/gads/conf/gads_testeduge_simul.xml

# DOCKER_INSPECT=$(shell ${DOCKER_CMD} inspect ${DOCKER_TAG})
# DOCKER_ID=$(shell ${DOCKER_CMD} inspect ${DOCKER_TAG} | grep "id\":" | cut -d'"' -f4)
DOCKER_ID_FILE=log/built

# # # dev:
    # @echo DOCKER_ID2=$(DOCKER_ID)
    # @echo DOCKER_ID_FILE=$(DOCKER_ID_FILE)

help:
    @echo "make build     : build the docker images"
    @echo "make push     : push the docker image to the docker registry"
    @echo "make bash     : start the container with a command line session"
    @echo "make dryrun    : run a sync without writting (simulation)"
    @echo "make run        : run a sync without writting "
    @echo "make crypt    : encrypt a string, to be reported in conf xml file"
    @echo "make help    : this page"


# image construction. Sleep to ease sync
$(DOCKER_ID_FILE): Dockerfile 
    $(DOCKER_CMD) build -t $(DOCKER_TAG) .
    @touch $@
    @sleep 1

build: $(DOCKER_ID_FILE)
    @echo built.

# push into registry
push : build
    $(DOCKER_CMD) push $(DOCKER_TAG) 

# simple command line access
bash: build
    $(DOCKER_CMD) run $(DOCKER_RUN_PARAMS) -i -t $(DOCKER_TAG) bash

dryrun: build    
    $(DOCKER_CMD) run $(DOCKER_RUN_PARAMS) -i -t $(DOCKER_TAG) ./sync-cmd -o -c $(GADS_XML_CONF_FILE)

run: build    
    $(DOCKER_CMD) run $(DOCKER_RUN_PARAMS) -i -t $(DOCKER_TAG) ./sync-cmd -a -o -c $(GADS_XML_CONF_FILE)


# crypt password, to report in conf xml file. encryptedAdminPassword / encryptedSslProxyPassword / authCredentialsEncrypted / 
crypt: build    
    $(DOCKER_CMD) run $(DOCKER_RUN_PARAMS) -i -t $(DOCKER_TAG) ./encrypt-util -c $(GADS_XML_CONF_FILE)


clean:
    @rm $(DOCKER_ID_FILE)

cleandocker:
    @docker rm $(docker ps -aq)
Docker Pull Command
Owner
bernigaud

Comments (0)