-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Refactored and reduced size of all images (on-demand installation, removed not needed packages, improved ENVs/LABELs to reduce numbers of layers) - Cleanup images - Add new on-demand installation and provisioning of services (eg. postfix, ssh...) - Improved python console handling and output, also fixes dependency detection - Renamed alpine-3 to alpine (symlink to keep backward compatibility) - Add webdevops/php-official and also to webdevops/php and other images - Introduce docker-image-info for gathering information about current used image (family, distribution, version ...) - Introduce docker-service enable and docker-service disable to enable and disable services (eg. postfix, ssh ...) - Fix supervisord message about passwordless http server (unix socket) - Fix and improve tests (eg. in ipv6 environments) - Add go-replace to replace sed/awk stuff - Add webdevops/liquisoap - Add LOG_STDOUT and LOG_STDERR (redirect docker output, also possible to prevent output using /dev/null) - Set nginx log level to warn in production and info in nginx-dev images - Move ansible to webdevops/base
- Loading branch information
Showing
3,262 changed files
with
32,416 additions
and
16,534 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
set -o nounset ## set -u : exit the script if you try to use an uninitialised variable | ||
set -o errexit ## set -e : exit the script if any statement returns a non-true return value | ||
|
||
apt-install software-properties-common | ||
add-apt-repository $@ | ||
apt-get purge -y -f software-properties-common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -o pipefail # trace ERR through pipes | ||
set -o errtrace # trace ERR through 'time command' and other functions | ||
set -o nounset ## set -u : exit the script if you try to use an uninitialised variable | ||
set -o errexit ## set -e : exit the script if any statement returns a non-true return value | ||
|
||
apt-get update | ||
touch /tmp/.apt-update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/sh | ||
|
||
set -o nounset ## set -u : exit the script if you try to use an uninitialised variable | ||
set -o errexit ## set -e : exit the script if any statement returns a non-true return value | ||
|
||
LSB_FAMILY=$(docker-image-info family) | ||
|
||
case "$LSB_FAMILY" in | ||
Debian) | ||
rm -f /tmp/.apt-update | ||
apt-get autoremove -y -f | ||
apt-get clean -y | ||
rm -rf /var/lib/apt/lists/* | ||
;; | ||
|
||
RedHat) | ||
yum autoremove --assumeyes | ||
yum clean all | ||
;; | ||
|
||
Alpine) | ||
find /var/lib/apk/ -mindepth 1 -delete | ||
;; | ||
|
||
Arch) | ||
pacman -Sc | ||
;; | ||
|
||
*) | ||
echo "ERROR: Distribution $LSB_FAMILY not supported" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
find /tmp/ /var/log/ -mindepth 1 -delete | ||
rm -rf /root/.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#!/bin/sh | ||
|
||
set -o nounset ## set -u : exit the script if you try to use an uninitialised variable | ||
set -o errexit ## set -e : exit the script if any statement returns a non-true return value | ||
|
||
help() { | ||
if [ -n "$1" ]; then | ||
echo "$1" | ||
echo "" | ||
fi | ||
|
||
echo "Usage: $0 <argument>" | ||
echo "" | ||
echo " Application arguments:" | ||
echo " family Get distribution family" | ||
echo " dist Get distribution name" | ||
echo " dist-version Get distribution version" | ||
echo " dist-release Get distribution release" | ||
echo " dist-codename Get distribution codename" | ||
echo " lsb Get lsb informations (if available)" | ||
echo " lsb-desc Get lsb description (if available)" | ||
echo " buildtime Get buildtime of docker image" | ||
echo "" | ||
|
||
exit $2 | ||
|
||
} | ||
|
||
if [ "$#" -ne 1 ]; then | ||
help "[ERROR] Invalid argument" 1 | ||
fi | ||
|
||
INFO_FILE="" | ||
|
||
case "$1" in | ||
dist-family|distribution-family|family) | ||
INFO_FILE=/opt/docker/etc/.registry/image_info_distribution_family | ||
;; | ||
|
||
dist|distribution) | ||
INFO_FILE=/opt/docker/etc/.registry/image_info_distribution | ||
;; | ||
|
||
dist-version|distribution-version) | ||
INFO_FILE=/opt/docker/etc/.registry/image_info_distribution_version | ||
;; | ||
|
||
dist-release|distribution-release) | ||
INFO_FILE=/opt/docker/etc/.registry/image_info_lsb_release | ||
;; | ||
|
||
dist-codename|distribution-codename) | ||
INFO_FILE=/opt/docker/etc/.registry/image_info_lsb_codename | ||
;; | ||
|
||
lsb) | ||
INFO_FILE=/opt/docker/etc/.registry/image_info_lsb | ||
;; | ||
|
||
lsb-desc|lsb-description) | ||
INFO_FILE=/opt/docker/etc/.registry/image_info_lsb_description | ||
;; | ||
|
||
buildtime) | ||
INFO_FILE=/opt/docker/etc/.registry/image_info_buildtime | ||
;; | ||
|
||
help) | ||
help "" 0 | ||
;; | ||
|
||
*) | ||
help "[ERROR] Invalid argument" 1 | ||
;; | ||
esac | ||
|
||
if [ -n "$INFO_FILE" ]; then | ||
if [ -f "$INFO_FILE" ]; then | ||
cat -- "$INFO_FILE" | ||
else | ||
echo "[ERROR] Infomation file $INFO_FILE not found!" | ||
echo " Please run generate-dockerimage-info on docker image creation!" | ||
exit 2 | ||
fi | ||
else | ||
help "" 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#!/bin/sh | ||
|
||
set -o nounset ## set -u : exit the script if you try to use an uninitialised variable | ||
set -o errexit ## set -e : exit the script if any statement returns a non-true return value | ||
|
||
LSB_FAMILY="" | ||
|
||
############################# | ||
# Distribution detection | ||
############################# | ||
|
||
if [ -x "/usr/bin/apt-get" ]; then | ||
# Debian family | ||
LSB_FAMILY="Debian" | ||
|
||
elif [ -x "/bin/yum" ]; then | ||
# RedHat family | ||
LSB_FAMILY="RedHat" | ||
|
||
elif [ -x "/sbin/apk" ]; then | ||
# Alpine family | ||
LSB_FAMILY="Alpine" | ||
|
||
elif [ -f "/etc/arch-release" ]; then | ||
# Alpine family | ||
LSB_FAMILY="Arch" | ||
|
||
else | ||
# Unknown | ||
echo "ERROR: Distribution detection failed" | ||
exit 1 | ||
fi | ||
|
||
############################# | ||
# Install | ||
############################# | ||
|
||
case "$LSB_FAMILY" in | ||
Debian) | ||
apt-install lsb-release | ||
;; | ||
|
||
RedHat) | ||
yum-install redhat-lsb-core | ||
;; | ||
esac | ||
|
||
############################# | ||
# Set distribution information | ||
############################# | ||
|
||
echo "Detected $LSB_FAMILY" | ||
|
||
mkdir -p /opt/docker/etc/.registry/ | ||
echo "$LSB_FAMILY" > /opt/docker/etc/.registry/image_info_distribution_family | ||
echo "$LSB_FAMILY" > /opt/docker/etc/.registry/image_info_distribution | ||
date +%s >/opt/docker/etc/.registry/image_info_buildtime | ||
|
||
# Create all files | ||
touch /opt/docker/etc/.registry/image_info_distribution_version | ||
touch /opt/docker/etc/.registry/image_info_lsb | ||
touch /opt/docker/etc/.registry/image_info_lsb_description | ||
touch /opt/docker/etc/.registry/image_info_lsb_release | ||
touch /opt/docker/etc/.registry/image_info_lsb_codename | ||
|
||
# Collect distribution specific informations | ||
case "$LSB_FAMILY" in | ||
Debian|RedHat) | ||
lsb_release -i -s > /opt/docker/etc/.registry/image_info_distribution | ||
lsb_release -r -s > /opt/docker/etc/.registry/image_info_distribution_version | ||
lsb_release -a > /opt/docker/etc/.registry/image_info_lsb | ||
lsb_release -d -s > /opt/docker/etc/.registry/image_info_lsb_description | ||
lsb_release -r -s > /opt/docker/etc/.registry/image_info_lsb_release | ||
lsb_release -c -s > /opt/docker/etc/.registry/image_info_lsb_codename | ||
;; | ||
|
||
Alpine) | ||
cat /etc/alpine-release > /opt/docker/etc/.registry/image_info_distribution_version | ||
;; | ||
esac | ||
|
||
|
||
############################# | ||
# Uninstall | ||
############################# | ||
|
||
case "$LSB_FAMILY" in | ||
Debian) | ||
apt-get purge -y -f lsb-release | ||
;; | ||
|
||
RedHat) | ||
yum erase --assumeyes redhat-lsb-core | ||
yum autoremove --assumeyes | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.