forked from webdevops/Dockerfile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve generate-dockerimage-info * Add baselayout for typo3-solr * Implement Arch Linux support for baselayout * Remove lsb-release * Fix dependency detection for latest images * Remove logrotate * Improve bootstrap * Add transparent wrapper for apt-add-repository (automatic installation & deinstallation) * Add prefetched apt repository lists (cleanup in docker-image-cleanup; reduce load on debian and ubuntu repositories) * Reduze size for bootstrap * Add docker image cleanup script * Add static distribution information collection (for testsuite)
- Loading branch information
Showing
429 changed files
with
1,365 additions
and
1,278 deletions.
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
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,35 @@ | ||
#!/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=$(cat /etc/dockerimage_distribution_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 |
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,95 @@ | ||
#!/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" | ||
echo "$LSB_FAMILY" > /etc/dockerimage_distribution_family | ||
echo "$LSB_FAMILY" > /etc/dockerimage_distribution | ||
|
||
# Create all files | ||
touch /etc/dockerimage_distribution_version | ||
touch /etc/dockerimage_lsb | ||
touch /etc/dockerimage_lsb_id | ||
touch /etc/dockerimage_lsb_id | ||
touch /etc/dockerimage_lsb_release | ||
touch /etc/dockerimage_lsb_codename | ||
|
||
# Collect distribution specific informations | ||
case "$LSB_FAMILY" in | ||
Debian|RedHat) | ||
lsb_release -i -s > /etc/dockerimage_distribution | ||
lsb_release -r -s > /etc/dockerimage_distribution_version | ||
lsb_release -a > /etc/dockerimage_lsb | ||
lsb_release -i -s > /etc/dockerimage_lsb_id | ||
lsb_release -d -s > /etc/dockerimage_lsb_id | ||
lsb_release -r -s > /etc/dockerimage_lsb_release | ||
lsb_release -c -s > /etc/dockerimage_lsb_codename | ||
;; | ||
|
||
Alpine) | ||
cat /etc/alpine-release > /etc/dockerimage_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
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
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
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
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
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.