Skip to content

Commit 909ef73

Browse files
committed
Optimize image size
Combined RUN commands and cleared up yum cache after package install
1 parent 72ebec7 commit 909ef73

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ The new document store features of MySQL are implemented as a plugin to MySQL Se
1212

1313
Invoke the shell as follows:
1414

15-
docker run -it -e MYSQL_HOST=mysqlhostname mysql-shell init
15+
docker run -it -e MYSQL_HOST=<hostname> mysql-shell init
1616

1717
You will be asked to enter the password for the server's root user. You should see a message that the mysqlx plugin has been installed.
1818

1919
# Connecting to mysqlx-enabled server
2020

2121
To connect to the server, simply run the mysql-shell image the same way you would start a normal MySQL client:
2222

23-
docker run -it mysql-shell -u <username> -h mysqlhostname
23+
docker run -it mysql-shell -u <username> -h <hostname>
2424

2525
Once logged in, if you run `\status`, the shell should respond with `Session type: X`.
2626

Shell/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
FROM oraclelinux:latest
22

3-
RUN yum install -y wget
4-
RUN wget http://repo.mysql.com/yum/mysql-tools-preview/el/7/x86_64/mysql-shell-1.0.3-1.el7.x86_64.rpm
5-
RUN yum install -y mysql-shell-1.0.3-1.el7.x86_64.rpm
3+
RUN yum install -y wget \
4+
&& wget http://repo.mysql.com/yum/mysql-tools-preview/el/7/x86_64/mysql-shell-1.0.3-1.el7.x86_64.rpm \
5+
&& yum install -y mysql-shell-1.0.3-1.el7.x86_64.rpm \
6+
&& rm -rf /var/cache/yum/*
67

78
COPY docker-entrypoint.sh /entrypoint.sh
89
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)