-
-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom startup scripts #446
Merged
Merged
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
8f38cbd
Add examples for how to install Ms ODBC after accepting the license
cytopia aa574e9
Adjust ignored files
cytopia 0115ee3
Allow for custom startup scripts
cytopia 3359bd3
Pull docker images until success to circumvent short network outages
cytopia 42602d2
Bump version date
cytopia 30ea9ff
Fix undefined variable in intranet vhost_gen overview
cytopia 09c564c
Add documentation for custom startup scripts
cytopia d930c08
Fix requirements to build documentation
cytopia dbd69c8
Refs #394 - Add startup script examples for Oracle instaclient
cytopia b37afe3
Use latest PHP images without env var name collisions
cytopia ddbe0f9
Test against available php modules
cytopia cb7ec86
Test startup files
cytopia 7fabead
Auto accept EULA for CI tests
cytopia fad12d1
Tie PHP module check against currently used php-fpm tag
cytopia 79b1978
Ensure oracle oci8/pdo_oci work on every version
cytopia 4e44082
Import GPG key into rpm before installing software to ensure it is valid
cytopia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# | ||
# Simple example showing how to update the packet index | ||
# | ||
|
||
DEBIAN_FRONTEND=noninteractive apt-get update -q |
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,13 @@ | ||
# Custom startup scripts | ||
|
||
Any script inside this directory ending by `.sh` will be executed during the PHP container startup. | ||
This is useful to apply your custom settings such as installing software that usually requires | ||
the user to accept a license or similar. | ||
|
||
A few examples are given that do not end by `.sh` which won't be run. If you want to use the | ||
provided examples, copy them to a file ending by `.sh` | ||
|
||
|
||
## Important | ||
|
||
All provided scripts will be executed with **root** permissions. |
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,6 @@ | ||
#!/bin/bash | ||
# | ||
# Simple example showing how to update the packet index | ||
# | ||
|
||
DEBIAN_FRONTEND=noninteractive apt-get update -q |
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,13 @@ | ||
# Custom startup scripts | ||
|
||
Any script inside this directory ending by `.sh` will be executed during the PHP container startup. | ||
This is useful to apply your custom settings such as installing software that usually requires | ||
the user to accept a license or similar. | ||
|
||
A few examples are given that do not end by `.sh` which won't be run. If you want to use the | ||
provided examples, copy them to a file ending by `.sh` | ||
|
||
|
||
## Important | ||
|
||
All provided scripts will be executed with **root** permissions. |
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,6 @@ | ||
#!/bin/bash | ||
# | ||
# Simple example showing how to update the packet index | ||
# | ||
|
||
DEBIAN_FRONTEND=noninteractive apt-get update -q |
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,13 @@ | ||
# Custom startup scripts | ||
|
||
Any script inside this directory ending by `.sh` will be executed during the PHP container startup. | ||
This is useful to apply your custom settings such as installing software that usually requires | ||
the user to accept a license or similar. | ||
|
||
A few examples are given that do not end by `.sh` which won't be run. If you want to use the | ||
provided examples, copy them to a file ending by `.sh` | ||
|
||
|
||
## Important | ||
|
||
All provided scripts will be executed with **root** permissions. |
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,6 @@ | ||
#!/bin/bash | ||
# | ||
# Simple example showing how to update the packet index | ||
# | ||
|
||
DEBIAN_FRONTEND=noninteractive apt-get update -q |
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,13 @@ | ||
# Custom startup scripts | ||
|
||
Any script inside this directory ending by `.sh` will be executed during the PHP container startup. | ||
This is useful to apply your custom settings such as installing software that usually requires | ||
the user to accept a license or similar. | ||
|
||
A few examples are given that do not end by `.sh` which won't be run. If you want to use the | ||
provided examples, copy them to a file ending by `.sh` | ||
|
||
|
||
## Important | ||
|
||
All provided scripts will be executed with **root** permissions. |
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,6 @@ | ||
#!/bin/bash | ||
# | ||
# Simple example showing how to update the packet index | ||
# | ||
|
||
DEBIAN_FRONTEND=noninteractive apt-get update -q |
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,13 @@ | ||
# Custom startup scripts | ||
|
||
Any script inside this directory ending by `.sh` will be executed during the PHP container startup. | ||
This is useful to apply your custom settings such as installing software that usually requires | ||
the user to accept a license or similar. | ||
|
||
A few examples are given that do not end by `.sh` which won't be run. If you want to use the | ||
provided examples, copy them to a file ending by `.sh` | ||
|
||
|
||
## Important | ||
|
||
All provided scripts will be executed with **root** permissions. |
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,6 @@ | ||
#!/bin/bash | ||
# | ||
# Simple example showing how to update the packet index | ||
# | ||
|
||
DEBIAN_FRONTEND=noninteractive apt-get update -q |
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,55 @@ | ||
#!/bin/bash | ||
# | ||
# This script will automatically install the Microsoft ODBC driver for MsSQL | ||
# support for PHP during startup. | ||
# | ||
# In order for it to work, you must read and accept their License/EULA: | ||
# https://odbceula.blob.core.windows.net/eula17/LICENSE172.TXT | ||
# | ||
|
||
|
||
# ------------------------------------------------------------------------------------------------ | ||
# EDIT THE VARIABLE BELOW TO ACCEPT THE EULA (If you agree to their terms) | ||
# ------------------------------------------------------------------------------------------------ | ||
|
||
### | ||
### Set this to "Y" (capital 'Y') if you accept the EULA. | ||
### | ||
ACCEPT_EULA=N | ||
|
||
|
||
|
||
# ------------------------------------------------------------------------------------------------ | ||
# DO NOT EDIT BELOW THIS LINE | ||
# ------------------------------------------------------------------------------------------------ | ||
|
||
### | ||
### Where to retrieve the deb package | ||
### | ||
MSODBC_URL="https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql17/" | ||
|
||
|
||
### | ||
### Pre-flight check | ||
### | ||
if [ "${ACCEPT_EULA}" != "Y" ]; then | ||
echo "MS ODBC EULA not accepted. Aborting installation." | ||
exit 0 | ||
fi | ||
|
||
|
||
### | ||
### EULA accepted, so we can proceed | ||
### | ||
|
||
# Extract latest *.deb packate | ||
MSODBC_DEB="$( curl -k -sS "${MSODBC_URL}" | grep -Eo 'msodbcsql[-._0-9]+?_amd64\.deb' | tail -1 )" | ||
|
||
# Download to temporary location | ||
curl -k -sS "${MSODBC_URL}${MSODBC_DEB}" > "/tmp/${MSODBC_DEB}" | ||
|
||
# Install | ||
ACCEPT_EULA="${ACCEPT_EULA}" dpkg -i "/tmp/${MSODBC_DEB}" | ||
|
||
# Remove artifacts | ||
rm -f "/tmp/${MSODBC_DEB}" |
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,39 @@ | ||
#!/bin/bash | ||
# | ||
# https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | ||
# | ||
|
||
#curl -sS http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - | ||
|
||
# Install 'alien' to install rpm packages | ||
apt-get update -q | ||
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests alien | ||
|
||
# Instantclient (basic lite) | ||
curl -o /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm | ||
|
||
# Instantclient (devel) | ||
curl -o /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm | ||
|
||
# Install RPMs | ||
alien -i /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm | ||
alien -i /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm | ||
|
||
# Rempve RPMs | ||
rm -f /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm | ||
rm -f /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm | ||
|
||
# Necessary symlinks | ||
ln -s /usr/lib/oracle/18.3/client64/lib/libmql1.so /usr/lib/ | ||
ln -s /usr/lib/oracle/18.3/client64/lib/libipc1.so /usr/lib/ | ||
ln -s /usr/lib/oracle/18.3/client64/lib/libnnz18.so /usr/lib/ | ||
ln -s /usr/lib/oracle/18.3/client64/lib/libons.so /usr/lib/ | ||
ln -s /usr/lib/oracle/18.3/client64/lib/libclntshcore.so.18.1 /usr/lib/ | ||
|
||
# Build and install PHP extension oci8 | ||
docker-php-ext-configure oci8 --with-oci8=instantclient | ||
docker-php-ext-install oci8 | ||
|
||
# Build and install PHP extension pdo_oci | ||
docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr,18.3 | ||
docker-php-ext-install pdo_oci |
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,13 @@ | ||
# Custom startup scripts | ||
|
||
Any script inside this directory ending by `.sh` will be executed during the PHP container startup. | ||
This is useful to apply your custom settings such as installing software that usually requires | ||
the user to accept a license or similar. | ||
|
||
A few examples are given that do not end by `.sh` which won't be run. If you want to use the | ||
provided examples, copy them to a file ending by `.sh` | ||
|
||
|
||
## Important | ||
|
||
All provided scripts will be executed with **root** permissions. |
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,6 @@ | ||
#!/bin/bash | ||
# | ||
# Simple example showing how to update the packet index | ||
# | ||
|
||
DEBIAN_FRONTEND=noninteractive apt-get update -q |
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,55 @@ | ||
#!/bin/bash | ||
# | ||
# This script will automatically install the Microsoft ODBC driver for MsSQL | ||
# support for PHP during startup. | ||
# | ||
# In order for it to work, you must read and accept their License/EULA: | ||
# https://odbceula.blob.core.windows.net/eula17/LICENSE172.TXT | ||
# | ||
|
||
|
||
# ------------------------------------------------------------------------------------------------ | ||
# EDIT THE VARIABLE BELOW TO ACCEPT THE EULA (If you agree to their terms) | ||
# ------------------------------------------------------------------------------------------------ | ||
|
||
### | ||
### Set this to "Y" (capital 'Y') if you accept the EULA. | ||
### | ||
ACCEPT_EULA=N | ||
|
||
|
||
|
||
# ------------------------------------------------------------------------------------------------ | ||
# DO NOT EDIT BELOW THIS LINE | ||
# ------------------------------------------------------------------------------------------------ | ||
|
||
### | ||
### Where to retrieve the deb package | ||
### | ||
MSODBC_URL="https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql17/" | ||
|
||
|
||
### | ||
### Pre-flight check | ||
### | ||
if [ "${ACCEPT_EULA}" != "Y" ]; then | ||
echo "MS ODBC EULA not accepted. Aborting installation." | ||
exit 0 | ||
fi | ||
|
||
|
||
### | ||
### EULA accepted, so we can proceed | ||
### | ||
|
||
# Extract latest *.deb packate | ||
MSODBC_DEB="$( curl -k -sS "${MSODBC_URL}" | grep -Eo 'msodbcsql[-._0-9]+?_amd64\.deb' | tail -1 )" | ||
|
||
# Download to temporary location | ||
curl -k -sS "${MSODBC_URL}${MSODBC_DEB}" > "/tmp/${MSODBC_DEB}" | ||
|
||
# Install | ||
ACCEPT_EULA="${ACCEPT_EULA}" dpkg -i "/tmp/${MSODBC_DEB}" | ||
|
||
# Remove artifacts | ||
rm -f "/tmp/${MSODBC_DEB}" |
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,39 @@ | ||
#!/bin/bash | ||
# | ||
# https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | ||
# | ||
|
||
#curl -sS http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - | ||
|
||
# Install 'alien' to install rpm packages | ||
apt-get update -q | ||
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests alien | ||
|
||
# Instantclient (basic lite) | ||
curl -o /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm | ||
|
||
# Instantclient (devel) | ||
curl -o /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm | ||
|
||
# Install RPMs | ||
alien -i /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm | ||
alien -i /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm | ||
|
||
# Rempve RPMs | ||
rm -f /tmp/oracle-instantclient18.3-basiclite-18.3.0.0.0-2.x86_64.rpm | ||
rm -f /tmp/oracle-instantclient18.3-devel-18.3.0.0.0-2.x86_64.rpm | ||
|
||
# Necessary symlinks | ||
ln -s /usr/lib/oracle/18.3/client64/lib/libmql1.so /usr/lib/ | ||
ln -s /usr/lib/oracle/18.3/client64/lib/libipc1.so /usr/lib/ | ||
ln -s /usr/lib/oracle/18.3/client64/lib/libnnz18.so /usr/lib/ | ||
ln -s /usr/lib/oracle/18.3/client64/lib/libons.so /usr/lib/ | ||
ln -s /usr/lib/oracle/18.3/client64/lib/libclntshcore.so.18.1 /usr/lib/ | ||
|
||
# Build and install PHP extension oci8 | ||
docker-php-ext-configure oci8 --with-oci8=instantclient | ||
docker-php-ext-install oci8 | ||
|
||
# Build and install PHP extension pdo_oci | ||
docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr,18.3 | ||
docker-php-ext-install pdo_oci |
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,13 @@ | ||
# Custom startup scripts | ||
|
||
Any script inside this directory ending by `.sh` will be executed during the PHP container startup. | ||
This is useful to apply your custom settings such as installing software that usually requires | ||
the user to accept a license or similar. | ||
|
||
A few examples are given that do not end by `.sh` which won't be run. If you want to use the | ||
provided examples, copy them to a file ending by `.sh` | ||
|
||
|
||
## Important | ||
|
||
All provided scripts will be executed with **root** permissions. |
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,6 @@ | ||
#!/bin/bash | ||
# | ||
# Simple example showing how to update the packet index | ||
# | ||
|
||
DEBIAN_FRONTEND=noninteractive apt-get update -q |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo in comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed it and will also test all available examples for validity during Travis CI run.