Skip to content

Commit 2341ac7

Browse files
committed
refactor(test): improve Dockerfile for MySQL Shell
1 parent 8e7d137 commit 2341ac7

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.env
22
.envrc
3+
test/.envrc

test/.envrc

-1
This file was deleted.

test/mysql-shell/Dockerfile

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
# docker buildx build --platform linux/amd64 -t mysqlshell:8.0.29 . --load
2-
31
FROM oraclelinux:7-slim
42

5-
ARG KEY=https://repo.mysql.com/RPM-GPG-KEY-mysql
6-
ARG MYSQL_SHELL_PACKAGE_URL="https://dev.mysql.com/get/mysql80-community-release-el7-8.noarch.rpm"
3+
ARG MYSQL_SHELL_PACKAGER_URL="https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-8.1.0-1.el7.x86_64.rpm"
74

85
COPY run.sh /run.sh
96
RUN chmod +x /run.sh
107

118
COPY setupCluster.js /setupCluster.js
129

13-
RUN rpmkeys --import $KEY \
14-
&& yum install -y $MYSQL_SHELL_PACKAGE_URL \
10+
RUN yum install -y $MYSQL_SHELL_PACKAGER_URL \
1511
&& yum clean all
1612

1713
ENTRYPOINT ["/run.sh"]

test/mysql-shell/run.sh

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -e
33

44
if [ "$1" = 'mysqlsh' ]; then
5+
mysqlsh --version
56

67
if [[ -z $MYSQL_HOST || -z $MYSQL_PORT || -z $MYSQL_USER || -z $MYSQL_PASSWORD ]]; then
78
echo "We require all of"

0 commit comments

Comments
 (0)