Skip to content

Add --setopt=skip_missing_names_on_install=False to "yum install" #871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions 5.7/Dockerfile.oracle

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 22 additions & 4 deletions template/Dockerfile.oracle
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{{ def dnf: if .oracle.variant | startswith("7") then "yum" else "microdnf" end -}}
{{
def dnf:
if .oracle.variant | startswith("7") then
"yum"
else
"microdnf"
end
;
def dnf_install:
dnf + " install -y"
| if . == "yum install -y" then
# --setopt=skip_missing_names_on_install=False: https://unix.stackexchange.com/a/477127/153467
. + " --setopt=skip_missing_names_on_install=False"
else . end
-}}
FROM oraclelinux:{{ .oracle.variant }}

RUN set -eux; \
Expand Down Expand Up @@ -34,7 +48,11 @@ RUN set -eux; \
gosu nobody true

RUN set -eux; \
{{ dnf }} install -y \
{{ if .oracle.variant | startswith("7") then ( -}}
# https://github.com/docker-library/mysql/pull/871#issuecomment-1167954236
{{ dnf_install }} oracle-epel-release-el7; \
{{ ) else "" end -}}
{{ dnf_install }} \
bzip2 \
gzip \
openssl \
Expand Down Expand Up @@ -73,7 +91,7 @@ RUN set -eu; \
} | tee /etc/yum.repos.d/mysql-community-minimal.repo

RUN set -eux; \
{{ dnf }} install -y "mysql-community-server-minimal-$MYSQL_VERSION"; \
{{ dnf_install }} "mysql-community-server-minimal-$MYSQL_VERSION"; \
{{ dnf }} clean all; \
# 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)
# https://github.com/docker-library/mysql/pull/680#issuecomment-636121520
Expand Down Expand Up @@ -104,7 +122,7 @@ RUN set -eu; \
} | tee /etc/yum.repos.d/mysql-community-tools.repo
ENV MYSQL_SHELL_VERSION {{ .["mysql-shell"].version }}
RUN set -eux; \
{{ dnf }} install -y "mysql-shell-$MYSQL_SHELL_VERSION"; \
{{ dnf_install }} "mysql-shell-$MYSQL_SHELL_VERSION"; \
{{ dnf }} clean all; \
\
mysqlsh --version
Expand Down