# E.S.L. Docker environement Repo sync & Dev

## Struct

```

|_> bin
|   |_> common.fct
|   |_> empty.sh
|   |_> esl.fct
|   |_> gen.sh
|   |_> repo.sh
|   |_> run.sh
|_> cible -> /data/GIT/ESL_PRODUIT-ol8/
|_> data
|   |_> cible
|   |_> log
|   |   |_> repo
|   |_> repo
|       |_> EPEL
|       |_> OLD
|       |_> OracleLinux
|_> define.conf -> .env
|_> doc
|   |_> 0_define.png
|   |_> 1_help.png
|   |_> 2_image.png
|   |_> 3_image-gen.png
|   |_> 4_image-repo.png
|   |_> 5_repo.png
|   |_> 6_gen-connect.png
|   |_> 7_gen.png
|   |_> 8_all.png
|   |_> ESL-devenv.pdf
|   |_> tree.png
|_> docker-compose.yml
|_> Dockerfile
|_> generate_env.sh
|_> README.md
|_> Template
    |_> docker-compose.yml.gen
    |_> docker-compose.yml.repo
    |_> Dockerfile.gen.centos
    |_> Dockerfile.gen.oraclelinux
    |_> Dockerfile.repo
    |_> Dockerfile.repo.centos
    |_> Dockerfile.repo.oraclelinux
    |_> function

11 directories, 31 files
```

## Help

```
devbase-astierg@[navalgroup-astierg]- ~ : $ /data/DOCKER/centos79repo/generate_env.sh 

./generate_env.sh [image/image-gen/image-repo/repo/gen/run-repo/run-gen]

	* image 	: Generate docker images
	* image-gen	: Generate docker image for esl compilator
	* image-repo	: Generate docker image  for repository sync 
	* repo		: start docker compose and generate repositories
	* gen		: start docker compose and generarte esl
	* run-gen	: Connect and run bash on instance gen
	* run-repo 	: Connect and run bash on instance repo

```

## Config File 


```
devbase-astierg@[navalgroup-astierg]- ~ : $ cat /data/DOCKER/centos79repo/define.conf

#####################################
# Repository generator

# Version of image
RepoVers=1
# Centos Version
#CentOsVersion=centos:7.9.2009
CentOsVersion=oraclelinux:8.6
Cible=oraclelinux
VersionCible=8.6
PackageManager=dnf
# Sync repo script 
Run=/usr/local/bin/sync.sh
# Sync arg script
# * del : delete all local repo
# * debug : only start docker instance
# * empty : sync whithout delete
RunArg=del

#####################################
# Esl compilator

# Version of image
GenVers=2
# Programme local directory
ProgrammeDir=/data/GIT/ESL_PRODUIT
# Repositories Directory
RepoDir=./data/repo
# If auto gen script esl Else leave empty and only start docker instance
GenScript=/usr/local/bin/gen.sh
```

## Debug / Function

```
devbase-astierg@[navalgroup-astierg]- /data/DOCKER/ESL-devenv : $ source Template/function 
devbase-astierg@[navalgroup-astierg]- /data/DOCKER/ESL-devenv : $  cat  Template/function  | grep '()' | cut -d"(" -f1
TestEnv
Res
help 
DeleteFile
DockerConnect
DockerPs
DockerStop
DeleteImg 
DockerGen
DockerComposeRun 
GenAll 
```

## cible

To create an ESL you have to make a symbolic link of the root project in cible in the root path of ESL-devenv

```
[14:17:48]─[devbase-astierg@astierg-tools]─[~/data/git/naval/ESL-devenv] ln -s  /data/GIT/ESL_PRODUIT-ol8/ ./cible
```

## Repo oracle

The repository list is: 

* EPEL
* baseos (latest)
* codeready
* appstream

Size : ~ 33Go



