Home

Awesome

Docker-Arch(itect)

Latest Stable Version License Total Downloads Build Status

SensioLabsInsight

Demonstration

Basic Demo

User Docker-Arch from dedicated Docker image (recommanded)

From dedicated Docker image.

docker pull ph3nol/docker-arch

Use Docker-Arch from local installation (PHP 7.1+ required)

curl -sSL https://raw.githubusercontent.com/Ph3nol/Docker-Arch/master/install.sh | sh

Docker-Arch environment generation

Go to your project root directory and create/edit .docker-arch.yml file see examples.

Then generate your Docker environment:

docker run -it -v $(PWD):/destination ph3nol/docker-arch:latest generate /destination

Finally, use .docker-arch/do script, from the project, for somes actions:

.docker-arch/do build    # Build containers (like `docker-compose up --build -d`)
.docker-arch/do start    # Start containers (like `docker-compose up -d`)
.docker-arch/do shell    # Access a container Shell
.docker-arch/do ui       # Access generated UI that provides you Docker environment informations
.docker-arch/do dc       # Access `docker-compose` with your configuration, for specific requests
.docker-arch/do stop     # Stop containers (like `docker-compose stop`)
.docker-arch/do clean    # Stop/Remove containers and reset linked volumes
...

To use the Docker image so fast, you can use these aliases/functions:

Unixy

function docker-arch {
    case "$1" in
        *)
            if [ -z $2 ]; then DESTINATION_PATH=$PWD; else DESTINATION_PATH=$2; fi
            if [[ "$DESTINATION_PATH" == "." ]]; then DESTINATION_PATH=$PWD; fi

            docker run -it -v $DESTINATION_PATH:/destination ph3nol/docker-arch:latest generate /destination
            ;;
    esac
}

Windows

// ~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1

function docker-arch ([String] $Destination = $PWD) {
  docker run --rm -it -v "${Destination}:/destination" ph3nol/docker-arch:latest generate /destination
}

To do