Passage des variables d'environnement proxy au conteneur + refactoring

This commit is contained in:
wpetit 2015-10-20 17:17:02 +02:00
parent 22f325f749
commit 1dec78875a
7 changed files with 4 additions and 25 deletions

View File

@ -71,7 +71,7 @@ function exec_hooks {
local hook=${1}
local workspace=${2}
local hook_scripts=$( find "${HOOKS_DIR}" -type f -name "*${hook}" -executable)
local hook_scripts=$( find "${HOOKS_DIR}" -type f -name "*${hook}" -executable | sort )
for hook_script in ${hook_scripts}; do

View File

@ -92,6 +92,9 @@ function main {
# Expose host uid & gid
docker_opt="${docker_opt} -e HOST_UID=$(id -u) -e HOST_GID=$(id -g)"
# Expose host proxy variables
docker_opt="${docker_opt} -e HTTP_PROXY=${HTTP_PROXY} -e HTTPS_PROXY=${HTTPS_PROXY}"
docker_opt="${docker_opt} -e http_proxy=${http_proxy} -e https_proxy=${https_proxy}"
if [[ ${PERSIST_CONTAINER} -eq 0 ]]
then

View File

@ -1,5 +0,0 @@
#!/usr/bin/env bash
mkdir -p $DESTDIR/opt/hello-world
cp $SRCDIR/hello-world $DESTDIR/opt/hello-world/

View File

@ -1,3 +0,0 @@
#!/bin/sh
echo "Test pre-install"

View File

@ -1,16 +0,0 @@
{
"name": "hello-world",
"dependencies": {
"debian:jessie": {
"apache2": ">= 2.4",
"php5": ">= 5.4"
}
},
"hooks": {
"preBuild": "./scripts/pre-build.sh",
"preInstall": "./scripts/pre-install.sh",
"preRemove": "",
"postInstall": "",
"postRemove": ""
}
}