diff options
| author | Mhd Sulhan <ms@kilabit.info> | 2016-01-29 19:19:02 +0700 |
|---|---|---|
| committer | Mhd Sulhan <ms@kilabit.info> | 2016-01-29 19:19:02 +0700 |
| commit | 0cbab491b606f0942a35e44ac8d22227a5c51cb4 (patch) | |
| tree | 240bd2fef8def62ff3232aeb010f0ef1e2840f4a | |
| parent | bdad0b6e1698b8062f5422f0a855b46605747546 (diff) | |
| download | arch-docker-0cbab491b606f0942a35e44ac8d22227a5c51cb4.tar.xz | |
Update all variable in images directory to use latest modification.
| -rwxr-xr-x | arch-base-gulp-etal/vars.sh | 19 | ||||
| -rw-r--r-- | arch-base-mongodb/mongodb.conf | 2 | ||||
| -rwxr-xr-x | arch-base-mongodb/vars.sh | 16 | ||||
| -rwxr-xr-x | arch-base-nodejs-0.12.9/vars.sh | 21 | ||||
| -rwxr-xr-x | arch-base-nodejs/vars.sh | 19 | ||||
| -rwxr-xr-x | arch-base-postgresql/vars.sh | 19 | ||||
| -rwxr-xr-x | arch-base-redis/vars.sh | 11 | ||||
| -rwxr-xr-x | arch-base-sailsjs/bootstrap_sailsjs.sh | 3 | ||||
| -rwxr-xr-x | arch-base-sailsjs/vars.sh | 19 | ||||
| -rwxr-xr-x | arch-base-template/vars.sh | 22 | ||||
| -rwxr-xr-x | arch-base/vars.sh | 2 |
11 files changed, 81 insertions, 72 deletions
diff --git a/arch-base-gulp-etal/vars.sh b/arch-base-gulp-etal/vars.sh index 9f710dd..145f545 100755 --- a/arch-base-gulp-etal/vars.sh +++ b/arch-base-gulp-etal/vars.sh @@ -1,18 +1,17 @@ #!/bin/zsh -THISD=${0:a:h} - +HOSTNAME="arch-gulp-etal" ROOTFS_SIZE=900M -PKGS+=(util-linux) -PKGS_ADD+=(git gcc make python2 nodejs npm) +PKGS=(util-linux) +PKGS_ADD=(git gcc make python2 nodejs npm) -IMAGE_NAME="sulhan/arch-gulp-etal" +IMAGE_NAME="sulhan/${HOSTNAME}" IMAGE_ARGS=(-c="VOLUME /srv/www" -c="VOLUME /root/.npm" -c="EXPOSE 10000" -c="CMD /init.sh") -IMAGE_FILES_BAK+=("${ROOTFS}/root/.npm" "${THISD}/npm") +IMAGE_FILES_BAK=("${ROOTFS}/root/.npm" "${THISD}/npm") -FILES+=("${THISD}/init.sh" "${ROOTFS}/") -FILES+=("${THISD}/bootstrap_gulp_etal.sh" "${ROOTFS}/") -FILES+=("${THISD}/npm" "${ROOTFS}/root/.npm") +FILES=("${PWD}/init.sh" "${ROOTFS}/") +FILES+=("${PWD}/bootstrap_gulp_etal.sh" "${ROOTFS}/") +FILES+=("${PWD}/npm" "${ROOTFS}/root/.npm") -BOOTSTRAP_S+=("/bootstrap_gulp_etal.sh") +BOOTSTRAP_SCRIPTS=("/bootstrap_gulp_etal.sh") diff --git a/arch-base-mongodb/mongodb.conf b/arch-base-mongodb/mongodb.conf index beeaa96..af18e39 100644 --- a/arch-base-mongodb/mongodb.conf +++ b/arch-base-mongodb/mongodb.conf @@ -9,6 +9,8 @@ storage: directoryPerDB: true journal: enabled: true + mmapv1: + smallFiles: true processManagement: fork: true net: diff --git a/arch-base-mongodb/vars.sh b/arch-base-mongodb/vars.sh index c5bb8cc..bca6d43 100755 --- a/arch-base-mongodb/vars.sh +++ b/arch-base-mongodb/vars.sh @@ -1,10 +1,9 @@ #!/bin/zsh -## Get current directory. -THISD=${0:a:h} +HOSTNAME="arch-mongodb" ## The name of docker image. -IMAGE_NAME="sulhan/arch-mongodb" +IMAGE_NAME="sulhan/${HOSTNAME}" ## ## List of arguments to be passed when creating images @@ -26,18 +25,17 @@ PKGS=(binutils coreutils file findutils gzip sed shadow) PKGS_ADD=(mongodb) ## List of packages to be removed after creating chroot. -PKGS_REMOVED=(binutils bzip2 db file findutils gdbm gzip less linux-api-header - pcre perl sed) +PKGS_REMOVED=(binutils file findutils gzip less sed shadow) ## List of files that will be copied from current directory to rootfs ## The init.sh file is used to run the image. ## Format: source destination. -FILES+=("${THISD}/init.sh" "${ROOTFS}/") -FILES+=("${THISD}/bootstrap_rootfs.sh" "${ROOTFS}/") -FILES+=("${THISD}/mongodb.conf" "${ROOTFS}/etc/") +FILES=("${PWD}/init.sh" "${ROOTFS}/") +FILES+=("${PWD}/bootstrap_rootfs.sh" "${ROOTFS}/") +FILES+=("${PWD}/mongodb.conf" "${ROOTFS}/etc/") ## List of script that will be running on rootfs after package has been ## installed. ## The script path is relative to rootfs. ## Do not use the name bootstrap.sh because it was preserved for main script. -BOOTSTRAP_S+=("/bootstrap_rootfs.sh") +BOOTSTRAP_SCRIPTS=("/bootstrap_rootfs.sh") diff --git a/arch-base-nodejs-0.12.9/vars.sh b/arch-base-nodejs-0.12.9/vars.sh index 5f28aeb..215398a 100755 --- a/arch-base-nodejs-0.12.9/vars.sh +++ b/arch-base-nodejs-0.12.9/vars.sh @@ -1,23 +1,22 @@ #!/bin/zsh -THISD=${0:a:h} - +HOSTNAME="arch-nodejs" ROOTFS_SIZE=900M PKGS+=(util-linux) PKGS_ADD+=(awk gcc git grep make python2) PKGS_REMOVED=() -IMAGE_NAME="sulhan/arch-nodejs-0.12.9" +IMAGE_NAME="sulhan/${HOSTNAME}-0.12.9" IMAGE_ARGS=(-c="VOLUME /srv/www" -c="VOLUME /root/.npm" -c="EXPOSE 80" -c="CMD /init.sh") -IMAGE_FILES_BAK+=("${ROOTFS}/root/.npm" "${THISD}/npm") +IMAGE_FILES_BAK=("${ROOTFS}/root/.npm" "${PWD}/npm") -FILES+=("${THISD}/init.sh" "${ROOTFS}/") -FILES+=("${THISD}/bootstrap_base_nodejs.sh" "${ROOTFS}/") -FILES+=("${THISD}/npm" "${ROOTFS}/root/.npm") -FILES+=("${THISD}/nvm" "${ROOTFS}/root/.nvm") -FILES+=("${THISD}/nvm.sh" "${ROOTFS}/etc/profile.d/") -FILES+=("${THISD}/pm2.json" "${ROOTFS}/") +FILES=("${PWD}/init.sh" "${ROOTFS}/") +FILES+=("${PWD}/bootstrap_base_nodejs.sh" "${ROOTFS}/") +FILES+=("${PWD}/npm" "${ROOTFS}/root/.npm") +FILES+=("${PWD}/nvm" "${ROOTFS}/root/.nvm") +FILES+=("${PWD}/nvm.sh" "${ROOTFS}/etc/profile.d/") +FILES+=("${PWD}/pm2.json" "${ROOTFS}/") -BOOTSTRAP_S+=("/bootstrap_base_nodejs.sh") +BOOTSTRAP_SCRIPTS=("/bootstrap_base_nodejs.sh") diff --git a/arch-base-nodejs/vars.sh b/arch-base-nodejs/vars.sh index b0f74d8..194373d 100755 --- a/arch-base-nodejs/vars.sh +++ b/arch-base-nodejs/vars.sh @@ -1,18 +1,17 @@ #!/bin/zsh -THISD=${0:a:h} - +HOSTNAME="arch-nodejs" ROOTFS_SIZE=900M -PKGS+=(util-linux) -PKGS_ADD+=(git gcc make python2 nodejs npm) +PKGS=(util-linux) +PKGS_ADD=(git gcc make python2 nodejs npm) -IMAGE_NAME="sulhan/arch-nodejs" +IMAGE_NAME="sulhan/${HOSTNAME}" IMAGE_ARGS=(-c="VOLUME /srv/www" -c="VOLUME /root/.npm" -c="EXPOSE 80" -c="CMD /init.sh") -IMAGE_FILES_BAK+=("${ROOTFS}/root/.npm" "${THISD}/npm") +IMAGE_FILES_BAK=("${ROOTFS}/root/.npm" "${PWD}/npm") -FILES+=("${THISD}/init.sh" "${ROOTFS}/") -FILES+=("${THISD}/bootstrap_nodejs.sh" "${ROOTFS}/") -FILES+=("${THISD}/npm" "${ROOTFS}/root/.npm") +FILES=("${PWD}/init.sh" "${ROOTFS}/") +FILES+=("${PWD}/bootstrap_nodejs.sh" "${ROOTFS}/") +FILES+=("${PWD}/npm" "${ROOTFS}/root/.npm") -BOOTSTRAP_S+=("/bootstrap_nodejs.sh") +BOOTSTRAP_SCRIPTS=("/bootstrap_nodejs.sh") diff --git a/arch-base-postgresql/vars.sh b/arch-base-postgresql/vars.sh index 3df9ec8..f2fcbef 100755 --- a/arch-base-postgresql/vars.sh +++ b/arch-base-postgresql/vars.sh @@ -1,16 +1,17 @@ #!/bin/zsh -THISD=${0:a:h} +HOSTNAME="arch-postgresql" -PKGS+=("util-linux") -PKGS_ADD+=("postgresql") +PKGS=(coreutils binutils findutils sed gzip file util-linux) +PKGS_ADD=("postgresql") +PKGS_REMOVED=(file gzip sed findutils less bzip2 pcre binutils util-linux) -IMAGE_NAME="sulhan/arch-postgresql" +IMAGE_NAME="sulhan/${HOSTNAME}" IMAGE_ARGS=(-c="VOLUME /var/lib/postgres" -c="EXPOSE 5432" -c="CMD /init.sh") -FILES+=("${THISD}/pg_hba.conf" "${ROOTFS}/") -FILES+=("${THISD}/postgresql.conf" "${ROOTFS}/") -FILES+=("${THISD}/init.sh" "${ROOTFS}/") -FILES+=("${THISD}/bootstrap_postgresql.sh" "${ROOTFS}/") +FILES=("${PWD}/pg_hba.conf" "${ROOTFS}/") +FILES+=("${PWD}/postgresql.conf" "${ROOTFS}/") +FILES+=("${PWD}/init.sh" "${ROOTFS}/") +FILES+=("${PWD}/bootstrap_postgresql.sh" "${ROOTFS}/") -BOOTSTRAP_S+=("/bootstrap_postgresql.sh") +BOOTSTRAP_SCRIPTS=("/bootstrap_postgresql.sh") diff --git a/arch-base-redis/vars.sh b/arch-base-redis/vars.sh index c1249f5..3a426b7 100755 --- a/arch-base-redis/vars.sh +++ b/arch-base-redis/vars.sh @@ -1,10 +1,13 @@ #!/bin/zsh -THISD=${0:a:h} +HOSTNAME="arch-redis" -PKGS+=("redis") -IMAGE_NAME="sulhan/arch-redis" +PKGS=(coreutils binutils findutils sed gzip file util-linux) +PKGS_ADD=("redis") +PKGS_REMOVED=(findutils sed gzip file util-linux) + +IMAGE_NAME="sulhan/${HOSTNAME}" IMAGE_ARGS=(-c="VOLUME /var/lib/redis" -c="EXPOSE 6379" -c="CMD /init.sh") -FILES+=("${THISD}/init.sh" "${ROOTFS}/") +FILES=("${THISD}/init.sh" "${ROOTFS}/") FILES+=("${THISD}/redis.conf" "${ROOTFS}/etc/") diff --git a/arch-base-sailsjs/bootstrap_sailsjs.sh b/arch-base-sailsjs/bootstrap_sailsjs.sh index 3fa3863..ed40d8d 100755 --- a/arch-base-sailsjs/bootstrap_sailsjs.sh +++ b/arch-base-sailsjs/bootstrap_sailsjs.sh @@ -4,6 +4,3 @@ npm install -g sails --unsafe-perm && \ npm install -g pm2 --unsafe-perm && \ npm install -g grunt-cli && \ rm -r /root/.node-gyp - -## cleaning ... -bootstrap_clean_nodejs diff --git a/arch-base-sailsjs/vars.sh b/arch-base-sailsjs/vars.sh index beb33c4..122d0d5 100755 --- a/arch-base-sailsjs/vars.sh +++ b/arch-base-sailsjs/vars.sh @@ -1,18 +1,17 @@ #!/bin/zsh -THISD=${0:a:h} - +HOSTNAME="arch-sailsjs" ROOTFS_SIZE=900M -PKGS+=(util-linux) -PKGS_ADD+=(git gcc make python2 nodejs npm) +PKGS=(util-linux) +PKGS_ADD=(git gcc make python2 nodejs npm) -IMAGE_NAME="sulhan/arch-nodejs-sails" +IMAGE_NAME="sulhan/${HOSTNAME}" IMAGE_ARGS=(-c="VOLUME /srv/www" -c="VOLUME /root/.npm" -c="EXPOSE 9000" -c="CMD /init.sh") -IMAGE_FILES_BAK+=("${ROOTFS}/root/.npm" "${THISD}/npm") +IMAGE_FILES_BAK=("${ROOTFS}/root/.npm" "${PWD}/npm") -FILES+=("${THISD}/init.sh" "${ROOTFS}/") -FILES+=("${THISD}/bootstrap_sailsjs.sh" "${ROOTFS}/") -FILES+=("${THISD}/npm" "${ROOTFS}/root/.npm") +FILES=("${PWD}/init.sh" "${ROOTFS}/") +FILES+=("${PWD}/bootstrap_sailsjs.sh" "${ROOTFS}/") +FILES+=("${PWD}/npm" "${ROOTFS}/root/.npm") -BOOTSTRAP_S+=("/bootstrap_sailsjs.sh") +BOOTSTRAP_SCRIPTS=("/bootstrap_sailsjs.sh") diff --git a/arch-base-template/vars.sh b/arch-base-template/vars.sh index 4057f0e..a24329f 100755 --- a/arch-base-template/vars.sh +++ b/arch-base-template/vars.sh @@ -1,8 +1,7 @@ #!/bin/zsh ## Default environment if its not set -export HOSTNAME="arch-base-template" - +HOSTNAME="arch-base-template" #export LANG=C.UTF-8 #export BOOT_LANG=en_GB.UTF-8 #export TIMEZONE=UTC @@ -19,17 +18,21 @@ export HOSTNAME="arch-base-template" #ROOTFS_SIZE=400M ## List of packages to be installed. +## Here we provided the minimal base packages. You can add your package in here +## by using `+=` syntax or use `PKGS_ADD`. PKGS=(coreutils binutils findutils sed gzip file) ## List of packages to be installed after PKGS. PKGS_ADD=() ## List of packages to be removed after creating chroot. -PKGS_REMOVED=(file gzip sed findutils less bzip2 pcre binutils perl db gdbm - linux-api-headers) +PKGS_REMOVED=(file gzip sed findutils less bzip2 binutils) +## List of packages to be removed without checking their dependencies. +## Be careful, because this can make some of your application does not run. +PKGS_REMOVED_FORCE=(linux-api-headers perl db gdbm pcre) ## List of files that will be copied from current directory to rootfs ## The init.sh file is used to run the image. ## Format: source destination. -FILES+=("${PWD}/init.sh" "${ROOTFS}/") +FILES=("${PWD}/init.sh" "${ROOTFS}/") FILES+=("${PWD}/bootstrap_rootfs.sh" "${ROOTFS}/") ## List of script that will be running on rootfs after package has been @@ -50,3 +53,12 @@ IMAGE_NAME="username/imagename" ## IMAGE_ARGS=(-c="VOLUME /var/lib/postgres" -c="EXPOSE 5432" -c="CMD /init.sh") ## IMAGE_ARGS=(-c="CMD /init.sh") + +## +## List of files that will be backed up from rootfs to local before creating +## an image. +## +## Example: +## IMAGE_FILES_BAK=("src" "dst") +## +IMAGE_FILES_BAK=() diff --git a/arch-base/vars.sh b/arch-base/vars.sh index a72e6e4..6db2089 100755 --- a/arch-base/vars.sh +++ b/arch-base/vars.sh @@ -11,7 +11,7 @@ export HOSTNAME="arch-base" #) PKGS=(coreutils binutils findutils sed gzip file) -PKGS_REMOVED=(file gzip sed findutils less bzip2 pcre binutils perl db gdbm linux-api-headers) +PKGS_REMOVED=(file gzip sed findutils less bzip2 pcre binutils) IMAGE_NAME="sulhan/arch-base" IMAGE_ARGS=() |
