-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from simplerisk/minimal-fix
simplerisk-minimal: remove protocol from mysql commands
- Loading branch information
Showing
4 changed files
with
33 additions
and
27 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
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 |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
set -euo pipefail | ||
|
||
readonly MYSQL_KEY_URL='http://repo.mysql.com/RPM-GPG-KEY-mysql-2023' | ||
|
||
if [ $# -eq 1 ]; then | ||
release=$1 | ||
[ "$release" == "testing" ] && images=('8.1') || images=('8.1' '8.3') | ||
|
@@ -23,14 +25,15 @@ LABEL maintainer="Simplerisk <[email protected]>" | |
WORKDIR /var/www | ||
# Add the apt config package | ||
RUN apt-get update && \ | ||
apt-get install -y gnupg2 && \ | ||
apt-key adv --keyserver pgp.mit.edu --recv-keys A8D3785C && \ | ||
echo "deb http://repo.mysql.com/apt/debian bookworm mysql-8.0" > /etc/apt/sources.list.d/mysql.list | ||
# Installing apt dependencies | ||
RUN apt-get update && \\ | ||
# Creating keyring env and installing apt dependencies | ||
RUN mkdir -p /etc/apt/keyrings && \\ | ||
apt-get update && \\ | ||
apt-get install -y gnupg2 wget && \\ | ||
wget -qO - $MYSQL_KEY_URL | gpg --dearmor -o /etc/apt/keyrings/mysql.gpg && \\ | ||
echo 'deb [signed-by=/etc/apt/keyrings/mysql.gpg] http://repo.mysql.com/apt/\$(lsb_release -si | tr '[:upper:]' '[:lower:]')/ \$(lsb_release -sc) mysql-8.0' | tee /etc/apt/sources.list.d/mysql.list && \\ | ||
apt-key adv --keyserver pgp.mit.edu --recv-keys A8D3785C && \\ | ||
echo "deb http://repo.mysql.com/apt/debian bookworm mysql-8.0" > /etc/apt/sources.list.d/mysql.list && \\ | ||
apt-get update && \\ | ||
apt-get -y install libldap2-dev \\ | ||
libicu-dev \\ | ||
libcap2-bin \\ | ||
|
@@ -91,9 +94,10 @@ RUN echo 'upload_max_filesize = 5M' >> /usr/local/etc/php/conf.d/docker-php-uplo | |
RUN rm -rf /var/www/html && \\ | ||
EOF | ||
|
||
[ ! $release == "testing" ] && echo " curl -sL https://simplerisk-downloads.s3.amazonaws.com/public/bundles/simplerisk-$release.tgz | tar xz -C /var/www && \\" >> "$image_dir/Dockerfile" || true | ||
# shellcheck disable=SC2015 | ||
[ ! "$release" == "testing" ] && echo " curl -sL https://simplerisk-downloads.s3.amazonaws.com/public/bundles/simplerisk-$release.tgz | tar xz -C /var/www && \\" >> "$image_dir/Dockerfile" || true | ||
echo " echo $release > /tmp/version" >> "$image_dir/Dockerfile" | ||
if [ $release == "testing" ]; then | ||
if [ "$release" == "testing" ]; then | ||
cat << EOF >> "$image_dir/Dockerfile" | ||
COPY ./simplerisk/ /var/www/simplerisk | ||
COPY common/simplerisk.sql /var/www/simplerisk/simplerisk.sql | ||
|
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 |
---|---|---|
|
@@ -7,14 +7,15 @@ LABEL maintainer="Simplerisk <[email protected]>" | |
|
||
WORKDIR /var/www | ||
|
||
# Add the apt config package | ||
RUN apt-get update && \ | ||
apt-get install -y gnupg2 && \ | ||
# Creating keyring env and installing apt dependencies | ||
RUN mkdir -p /etc/apt/keyrings && \ | ||
apt-get update && \ | ||
apt-get install -y gnupg2 wget && \ | ||
wget -qO - http://repo.mysql.com/RPM-GPG-KEY-mysql-2023 | gpg --dearmor -o /etc/apt/keyrings/mysql.gpg && \ | ||
echo 'deb [signed-by=/etc/apt/keyrings/mysql.gpg] http://repo.mysql.com/apt/$(lsb_release -si | tr '[:upper:]' '[:lower:]')/ $(lsb_release -sc) mysql-8.0' | tee /etc/apt/sources.list.d/mysql.list && \ | ||
apt-key adv --keyserver pgp.mit.edu --recv-keys A8D3785C && \ | ||
echo "deb http://repo.mysql.com/apt/debian bookworm mysql-8.0" > /etc/apt/sources.list.d/mysql.list | ||
|
||
# Installing apt dependencies | ||
RUN apt-get update && \ | ||
echo "deb http://repo.mysql.com/apt/debian bookworm mysql-8.0" > /etc/apt/sources.list.d/mysql.list && \ | ||
apt-get update && \ | ||
apt-get -y install libldap2-dev \ | ||
libicu-dev \ | ||
libcap2-bin \ | ||
|
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 |
---|---|---|
|
@@ -7,14 +7,15 @@ LABEL maintainer="Simplerisk <[email protected]>" | |
|
||
WORKDIR /var/www | ||
|
||
# Add the apt config package | ||
RUN apt-get update && \ | ||
apt-get install -y gnupg2 && \ | ||
# Creating keyring env and installing apt dependencies | ||
RUN mkdir -p /etc/apt/keyrings && \ | ||
apt-get update && \ | ||
apt-get install -y gnupg2 wget && \ | ||
wget -qO - http://repo.mysql.com/RPM-GPG-KEY-mysql-2023 | gpg --dearmor -o /etc/apt/keyrings/mysql.gpg && \ | ||
echo 'deb [signed-by=/etc/apt/keyrings/mysql.gpg] http://repo.mysql.com/apt/$(lsb_release -si | tr '[:upper:]' '[:lower:]')/ $(lsb_release -sc) mysql-8.0' | tee /etc/apt/sources.list.d/mysql.list && \ | ||
apt-key adv --keyserver pgp.mit.edu --recv-keys A8D3785C && \ | ||
echo "deb http://repo.mysql.com/apt/debian bookworm mysql-8.0" > /etc/apt/sources.list.d/mysql.list | ||
|
||
# Installing apt dependencies | ||
RUN apt-get update && \ | ||
echo "deb http://repo.mysql.com/apt/debian bookworm mysql-8.0" > /etc/apt/sources.list.d/mysql.list && \ | ||
apt-get update && \ | ||
apt-get -y install libldap2-dev \ | ||
libicu-dev \ | ||
libcap2-bin \ | ||
|