File tree Expand file tree Collapse file tree 2 files changed +21
-7
lines changed Expand file tree Collapse file tree 2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 1
- {{ def dnf: if .oracle.variant | startswith("7") then "yum" else "microdnf" end -}}
1
+ {{
2
+ def dnf:
3
+ if .oracle.variant | startswith("7") then
4
+ "yum"
5
+ else
6
+ "microdnf"
7
+ end
8
+ ;
9
+ def dnf_install:
10
+ dnf + " install -y"
11
+ | if . == "yum install -y" then
12
+ # --setopt=skip_missing_names_on_install=False: https://unix.stackexchange.com/a/477127/153467
13
+ . + " --setopt=skip_missing_names_on_install=False"
14
+ else . end
15
+ -}}
2
16
FROM oraclelinux:{{ .oracle.variant }}
3
17
4
18
RUN set -eux; \
@@ -34,7 +48,7 @@ RUN set -eux; \
34
48
gosu nobody true
35
49
36
50
RUN set -eux; \
37
- {{ dnf }} install -y \
51
+ {{ dnf_install }} \
38
52
bzip2 \
39
53
gzip \
40
54
openssl \
@@ -73,7 +87,7 @@ RUN set -eu; \
73
87
} | tee /etc/yum.repos.d/mysql-community-minimal.repo
74
88
75
89
RUN set -eux; \
76
- {{ dnf }} install -y "mysql-community-server-minimal-$MYSQL_VERSION"; \
90
+ {{ dnf_install }} "mysql-community-server-minimal-$MYSQL_VERSION"; \
77
91
{{ dnf }} clean all; \
78
92
# the "socket" value in the Oracle packages is set to "/var/lib/mysql" which isn't a great place for the socket (we want it in "/var/run/mysqld" instead)
79
93
# https://github.com/docker-library/mysql/pull/680#issuecomment-636121520
@@ -104,7 +118,7 @@ RUN set -eu; \
104
118
} | tee /etc/yum.repos.d/mysql-community-tools.repo
105
119
ENV MYSQL_SHELL_VERSION {{ .["mysql-shell"].version }}
106
120
RUN set -eux; \
107
- {{ dnf }} install -y "mysql-shell-$MYSQL_SHELL_VERSION"; \
121
+ {{ dnf_install }} "mysql-shell-$MYSQL_SHELL_VERSION"; \
108
122
{{ dnf }} clean all; \
109
123
\
110
124
mysqlsh --version
You can’t perform that action at this time.
0 commit comments