diff --git a/dist/docker/builder/debian/jessie/i686/Dockerfile b/dist/docker/builder/debian/jessie/i686/Dockerfile
index 89a6bfb2c..ecf52648b 100644
--- a/dist/docker/builder/debian/jessie/i686/Dockerfile
+++ b/dist/docker/builder/debian/jessie/i686/Dockerfile
@@ -1,10 +1,20 @@
-# Dockerfile - Build new package server
-# Build for server debian-8 (amd64)
+# Dockerfile - Build environment to compile khanat server
#
-# Copyright : GNU/AGPLv3
+# Copyright (C) 2017 AleaJactaEst
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
-# Created : 1 AUG 2017
-# Created by : AleaJactaEst
# to build :
# $ docker build . -t builder_debian_8_i686 --file dist/docker/builder/debian-8-i686/Dockerfile
diff --git a/dist/docker/builder/debian/jessie/i686/build-under-docker.sh b/dist/docker/builder/debian/jessie/i686/build-under-docker.sh
index 53eaf4ddc..2fd8f7b11 100755
--- a/dist/docker/builder/debian/jessie/i686/build-under-docker.sh
+++ b/dist/docker/builder/debian/jessie/i686/build-under-docker.sh
@@ -1,9 +1,21 @@
#!/bin/bash
-# Script to build Khaganat
-# Copyright : GNU/AGPLv3
+# Script to build Khaganat binary (executed in docker)
+#
+# Copyright (C) 2017 AleaJactaEst
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
-# Created : 1 AUG 2017
-# Created by : AleaJactaEst
declare DIRBUILD="/opt/code/build/"
if [[ -n "$1" ]]
diff --git a/dist/docker/builder/debian/jessie/i686/build.sh b/dist/docker/builder/debian/jessie/i686/build.sh
index 9d42b693e..9ef037675 100755
--- a/dist/docker/builder/debian/jessie/i686/build.sh
+++ b/dist/docker/builder/debian/jessie/i686/build.sh
@@ -1,11 +1,22 @@
#!/bin/bash
#
-# Script to build under docker
+# Script to build khaganat server
#
-# Copyright : GNU/AGPLv3
+# Copyright (C) 2017 AleaJactaEst
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
-# Created : 1 AUG 2017
-# Created by : AleaJactaEst
declare -i REMOVE=0
declare -i IMAGE=0
@@ -16,6 +27,7 @@ declare CMAKEOPTS=""
declare DOCKEROPTS=""
declare DIRBUILD=""
declare CLEANDOCKER=0
+declare -i CLEANIMAGENONE=0
declare -i AUTODETEC=1
declare IMAGEDOCKER="builder_khanat_debian_jessie_i686"
@@ -43,6 +55,7 @@ options:
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-a OPTS, --add-opts-cmake=OPTS : Adding options on cmake command (before build)
-c, --clean-container : remove all container in state Exited
+ -w, --clean-images-none : Remove images docker (with name 'none')
-m OPTS, --add-opts-docker=OPTS : Adding options on docker command (when build)
Example :
@@ -139,6 +152,10 @@ do
DOCKEROPTS="$DOCKEROPTS ${1#*=}"
shift
;;
+ -w|--clean-images-none)
+ CLEANIMAGENONE=1
+ shift
+ ;;
*)
msg_error "options '$1' not recoginze"
usage
@@ -222,5 +239,17 @@ then
docker rm --force `docker ps -qf 'status=exited' -f "ancestor=${IMAGEDOCKER}"` || exit 2
fi
+if [[ $CLEANIMAGENONE -ne 0 ]]
+then
+ msg_info "CLEAN IMAGE DOCKER 'NONE'"
+ listimages=( $(docker images | awk '{if ($1=="")print $3}') )
+
+ msg_debug "IMAGES NONE : ${listimages[@]}"
+ if [[ -n "${listimages[@]}" ]]
+ then
+ docker rmi --force "${listimages[@]}" || exit 2
+ fi
+fi
+
trap '' EXIT
msg_info "END"
diff --git a/dist/docker/builder/debian/jessie/x86_64/Dockerfile b/dist/docker/builder/debian/jessie/x86_64/Dockerfile
index 77415b240..d4cff01be 100644
--- a/dist/docker/builder/debian/jessie/x86_64/Dockerfile
+++ b/dist/docker/builder/debian/jessie/x86_64/Dockerfile
@@ -1,10 +1,20 @@
-# Dockerfile - Build new package server
-# Build for server debian-8 (amd64)
+# Dockerfile - Build environment to compile khanat server
#
-# Copyright : GNU/AGPLv3
+# Copyright (C) 2017 AleaJactaEst
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
-# Created : 1 AUG 2017
-# Created by : AleaJactaEst
# to build :
# $ docker build . -t builder_khanat_jessie_x86_64 --file dist/docker/builder/debian-8-amd64/Dockerfile
diff --git a/dist/docker/builder/debian/jessie/x86_64/build-under-docker.sh b/dist/docker/builder/debian/jessie/x86_64/build-under-docker.sh
index 0f175a6a3..8066006b6 100755
--- a/dist/docker/builder/debian/jessie/x86_64/build-under-docker.sh
+++ b/dist/docker/builder/debian/jessie/x86_64/build-under-docker.sh
@@ -1,9 +1,21 @@
#!/bin/bash
-# Script to build Khaganat
-# Copyright : GNU/AGPLv3
+# Script to build Khaganat binary (executed in docker)
+#
+# Copyright (C) 2017 AleaJactaEst
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
-# Created : 1 AUG 2017
-# Created by : AleaJactaEst
declare DIRBUILD="/opt/code/build/"
if [[ -n "$1" ]]
diff --git a/dist/docker/builder/debian/jessie/x86_64/build.sh b/dist/docker/builder/debian/jessie/x86_64/build.sh
index c3c436ff4..61825b040 100755
--- a/dist/docker/builder/debian/jessie/x86_64/build.sh
+++ b/dist/docker/builder/debian/jessie/x86_64/build.sh
@@ -1,11 +1,22 @@
#!/bin/bash
#
-# Script to build under docker
+# Script to build khaganat server
#
-# Copyright : GNU/AGPLv3
+# Copyright (C) 2017 AleaJactaEst
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
-# Created : 1 AUG 2017
-# Created by : AleaJactaEst
declare -i REMOVE=0
declare -i IMAGE=0
@@ -16,6 +27,7 @@ declare CMAKEOPTS=""
declare DOCKEROPTS=""
declare DIRBUILD=""
declare CLEANDOCKER=0
+declare -i CLEANIMAGENONE=0
declare -i AUTODETEC=1
declare IMAGEDOCKER="builder_khanat_debian_jessie_x86_64"
@@ -43,6 +55,7 @@ options:
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-a OPTS, --add-opts-cmake=OPTS : Adding options on cmake command (before build)
-c, --clean-container : remove all container in state Exited
+ -w, --clean-images-none : Remove images docker (with name 'none')
-m OPTS, --add-opts-docker=OPTS : Adding options on docker command (when build)
--only-build-server : adding option to build only server
@@ -145,6 +158,10 @@ do
CMAKEOPTS="$CMAKEOPTS -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_CLIENT=OFF -DWITH_DRIVER_OPENGL=OFF -DWITH_DRIVER_OPENAL=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_SOUND=OFF"
shift
;;
+ -w|--clean-images-none)
+ CLEANIMAGENONE=1
+ shift
+ ;;
*)
msg_error "options '$1' not recoginze"
usage
@@ -228,5 +245,17 @@ then
docker rm --force `docker ps -qf 'status=exited' -f "ancestor=${IMAGEDOCKER}"` || exit 2
fi
+if [[ $CLEANIMAGENONE -ne 0 ]]
+then
+ msg_info "CLEAN IMAGE DOCKER 'NONE'"
+ listimages=( $(docker images | awk '{if ($1=="")print $3}') )
+
+ msg_debug "IMAGES NONE : ${listimages[@]}"
+ if [[ -n "${listimages[@]}" ]]
+ then
+ docker rmi --force "${listimages[@]}" || exit 2
+ fi
+fi
+
trap '' EXIT
msg_info "END"
diff --git a/dist/docker/server/debian/jessie/x86_64/Dockerfile b/dist/docker/server/debian/jessie/x86_64/Dockerfile
index 9d7161331..cf3c8d1b3 100644
--- a/dist/docker/server/debian/jessie/x86_64/Dockerfile
+++ b/dist/docker/server/debian/jessie/x86_64/Dockerfile
@@ -1,10 +1,20 @@
-# Dockerfile - Build new package server
-# Build for server debian-8 (amd64)
+# Dockerfile - Build image to prepare khanat server
#
-# Copyright : GNU/AGPLv3
+# Copyright (C) 2017 AleaJactaEst
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
-# Created : 1 AUG 2017
-# Createryzomwebd by : AleaJactaEst
FROM amd64/debian:8
MAINTAINER AleaJactaEst
diff --git a/dist/docker/server/debian/jessie/x86_64/Dockerfile.khanat b/dist/docker/server/debian/jessie/x86_64/Dockerfile.khanat
index b907e3bae..803305447 100644
--- a/dist/docker/server/debian/jessie/x86_64/Dockerfile.khanat
+++ b/dist/docker/server/debian/jessie/x86_64/Dockerfile.khanat
@@ -1,10 +1,20 @@
-# Dockerfile - Build new package server
-# Build for server debian-8 (amd64)
+# Dockerfile - Build for server debian
#
-# Copyright : GNU/AGPLv3
+# Copyright (C) 2017 AleaJactaEst
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
#
-# Created : 1 AUG 2017
-# Createryzomwebd by : AleaJactaEst
FROM server_generic_debian_jessie_x86_64
MAINTAINER AleaJactaEst
@@ -15,6 +25,15 @@ COPY todelete.sh /opt/khanat_config.sh
COPY dist/docker/server/debian/common/init-khanat.sh /opt/
COPY dist/docker/server/debian/common/autostart.sh /opt/
COPY dist/docker/server/debian/common/launch_services.sh /opt/
+
+COPY dist/docker/server/debian/common/configure_environment.sh /opt/
+COPY dist/docker/server/debian/common/install_package.sh /opt/
+COPY dist/docker/server/debian/common/configure_apache.sh /opt/
+COPY dist/docker/server/debian/common/configure_database.sh /opt/
+COPY dist/docker/server/debian/common/initialize_khanat_server.sh /opt/
+COPY dist/docker/server/debian/common/initialize_patch_server.sh /opt/
+COPY dist/docker/server/debian/common/prepare_start_server.sh /opt/
+
COPY ryzomcore.tar.gz /opt/
COPY ryzom-ressources.tar.gz /opt/
COPY khanat-ressources.tar.gz /opt/
@@ -22,5 +41,3 @@ COPY khanat-data-client.tar.gz /opt/
RUN /opt/init-khanat.sh
-
-
diff --git a/dist/docker/server/debian/jessie/x86_64/server.sh b/dist/docker/server/debian/jessie/x86_64/server.sh
index 2be65e1df..4d9816ccd 100755
--- a/dist/docker/server/debian/jessie/x86_64/server.sh
+++ b/dist/docker/server/debian/jessie/x86_64/server.sh
@@ -2,10 +2,21 @@
#
# Script to start khanat server
#
-# Copyright : GNU/AGPLv3
+# Copyright (C) 2017 AleaJactaEst
#
-# Created : 1 AUG 2017
-# Created by : AleaJactaEst
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
declare -i IMAGE=1
declare -i BASICSERVER=0
@@ -22,6 +33,7 @@ declare -i CONNECTSSHKHANAT=0
declare -i KHANAT_CLIENT_VERSION=1
declare -i SHOWIPKHANATSERVER=0
declare -i METHODSTARTSERVER=1
+declare -i CLEANIMAGENONE=0
declare IMAGEGENERICSERVER="server_generic_debian_jessie_x86_64"
declare IMAGEKHANATSERVER="server_khanat_debian_jessie_x86_64"
@@ -51,6 +63,7 @@ options:
-n, --no-launch-khanat : Doesn't launch khanat server
-s, --stop-server : Stop server khanat
-c, --clean-container-khanat : Remove old server khanat (stopped)
+ -w, --clean-images-none : Remove images docker (with name 'none')
-i, --show-ip-khanat-server : show ip address for khanat server (launch under docker)
--start-khanat-with-screen : [default] start khanat with screen
--start-khanat-with-full-log : start server khanat and show full log
@@ -163,6 +176,10 @@ do
KHANAT_CLIENT_VERSION="${1#*=}"
shift
;;
+ -w|--clean-images-none)
+ CLEANIMAGENONE=1
+ shift
+ ;;
*)
msg_error "options '$1' not recoginze"
usage
@@ -345,6 +362,18 @@ then
fi
fi
+if [[ $CLEANIMAGENONE -ne 0 ]]
+then
+ msg_info "CLEAN IMAGE DOCKER 'NONE'"
+ listimages=( $(docker images | awk '{if ($1=="")print $3}') )
+
+ msg_debug "IMAGES NONE : ${listimages[@]}"
+ if [[ -n "${listimages[@]}" ]]
+ then
+ docker rmi --force "${listimages[@]}" || exit 2
+ fi
+fi
+
if [[ $BASICSERVER -ne 0 ]]
then
msg_info "GENERATE DOCKER IMAGE BASIC SERVER"