Skip to content

Add "/entrypoint.sh" backwards-compat symlink in Oracle-based images #885

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 1 commit into from
Jul 11, 2022
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
1 change: 1 addition & 0 deletions 5.7/Dockerfile.oracle

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

1 change: 1 addition & 0 deletions 8.0/Dockerfile.oracle

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

2 changes: 2 additions & 0 deletions template/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ VOLUME /var/lib/mysql
COPY config/ /etc/mysql/
{{ ) else "" end -}}
COPY docker-entrypoint.sh /usr/local/bin/
{{ if [ "5.7", "8.0" ] | index(env.version) then ( -}}
RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat
{{ ) else "" end -}}
ENTRYPOINT ["docker-entrypoint.sh"]

EXPOSE 3306 33060
Expand Down
3 changes: 3 additions & 0 deletions template/Dockerfile.oracle
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ RUN set -eux; \
VOLUME /var/lib/mysql

COPY docker-entrypoint.sh /usr/local/bin/
{{ if [ "5.7", "8.0" ] | index(env.version) then ( -}}
RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use an absolute path? (just to be sure / explicit)?

Suggested change
RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat
RUN ln -s /usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I guess the image would unlikely get a WORKDIR changed/set, but if it would..)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 it's put in the root, and this matches the Debian version 😇

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Semi-intentional that it's not "pretty" so that we definitely get rid of it later 👀)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 alright, you win 😂💜

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No hard(link) feelings 🤣

{{ ) else "" end -}}
ENTRYPOINT ["docker-entrypoint.sh"]

EXPOSE 3306 33060
Expand Down