Skip to content

Commit

Permalink
Conditional MySQL Client installation (apache#11174)
Browse files Browse the repository at this point in the history
This is the second step of making the Production Docker Image more
corporate-environment friendly, by making MySQL client installation
optional. Instaling MySQL Client on Debian requires to reach out
to oracle deb repositories which might not be approved by security
teams when you build the images. Also not everyone needs MySQL
client or might want to install their own MySQL client or MariaDB
client - from their own repositories.

This change makes the installation step separated out to
script (with prod/dev installation option). The prod/dev separation
is needed because MySQL needs to be installed with dev libraries
in the "Build" segment of the image (requiring build essentials
etc.) but in "Final" segment of the image only runtime libraries
are needed.

Part of apache#11171

Depends on apache#11173.

(cherry picked from commit 044b441)
  • Loading branch information
potiuk authored and ashmeet13 committed Oct 6, 2020
1 parent 25b6cb0 commit 0168f71
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,10 @@ This is the current syntax for `./breeze <./breeze>`_:
Build options:
--disable-mysql-client-installation
Disables installation of the mysql client which might be problematic if you are building
image in controlled environment. Only valid for production image.
--disable-mysql-client-installation
Disables installation of the mysql client which might be problematic if you are building
image in controlled environment. Only valid for production image.
Expand Down Expand Up @@ -1744,6 +1748,10 @@ This is the current syntax for `./breeze <./breeze>`_:
Build options:
--disable-mysql-client-installation
Disables installation of the mysql client which might be problematic if you are building
image in controlled environment. Only valid for production image.
--disable-mysql-client-installation
Disables installation of the mysql client which might be problematic if you are building
image in controlled environment. Only valid for production image.
Expand Down Expand Up @@ -2095,6 +2103,10 @@ This is the current syntax for `./breeze <./breeze>`_:
Build options:
--disable-mysql-client-installation
Disables installation of the mysql client which might be problematic if you are building
image in controlled environment. Only valid for production image.
--disable-mysql-client-installation
Disables installation of the mysql client which might be problematic if you are building
image in controlled environment. Only valid for production image.
Expand Down
9 changes: 9 additions & 0 deletions breeze
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,11 @@ function breeze::parse_arguments() {
echo "Tag to add to the image: ${IMAGE_TAG}"
shift 2
;;
--disable-mysql-client-installation)
export INSTALL_MYSQL_CLIENT="false"
echo "Install MySQL client: ${INSTALL_MYSQL_CLIENT}"
shift
;;
-D | --dockerhub-user)
export DOCKERHUB_USER="${2}"
echo "Dockerhub user ${DOCKERHUB_USER}"
Expand Down Expand Up @@ -2220,6 +2225,10 @@ ${FORMATTED_DEFAULT_PROD_EXTRAS}
Build options:
--disable-mysql-client-installation
Disables installation of the mysql client which might be problematic if you are building
image in controlled environment. Only valid for production image.
--disable-mysql-client-installation
Disables installation of the mysql client which might be problematic if you are building
image in controlled environment. Only valid for production image.
Expand Down

0 comments on commit 0168f71

Please sign in to comment.