-
Notifications
You must be signed in to change notification settings - Fork 236
keep backward compatibility with debian images #51
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Using When you consider that |
please ensure this approach also will supports
@tianon i also noticed the |
926edcd
to
50f77f8
Compare
Hi @tianon, Hi @glensc, |
&& rm -rf /var/cache/yum /var/lib/mysql | ||
|
||
# purge and re-create /var/lib/mysql with appropriate ownership | ||
RUN /usr/bin/install -m 0775 -o 999 -g 0 -d /var/lib/mysql /var/run/mysqld /docker-entrypoint-initdb.d \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nitpick: you can user -o mysql -g root
as the user/group already created in this very Dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
COPY ps-entry.sh /docker-entrypoint.sh | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
USER 999 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as the user is created in this very dockerfile, i find it more elegant to use name than uid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
50f77f8
to
2a9e9be
Compare
&& echo "THP_SETTING=never" >> /etc/sysconfig/mysql \ | ||
# allow to change config files | ||
&& chown -R mysql:root /etc/my.cnf /etc/my.cnf.d \ | ||
&& chmod -R ug+rw /etc/my.cnf /etc/my.cnf.d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to this PR, but you may want to add X
for directories, not to rely on previous state or umask:
&& chmod -R ug+rwX /etc/my.cnf /etc/my.cnf.d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
2a9e9be
to
7d14c12
Compare
DockerizedInstance.SourceSQL() now specifically adds "-u root" to the mysql client command-line. This is necessary in recent Percona releases, which recently changed Docker user to "mysql" in PR percona/percona-docker#51. This means `docker exec` also uses "mysql" user, which in turn acts as the default for mysql connections too if no user is specified. DockerizedInstance.Stop() increased timeout from 3sec to 10sec. In cases where the timeout is hit, the instance may not be able to be started again, and this seems to happen more frequently with 5.7 images (mysql or percona) on MacOS for unknown reasons.
This commit updates dep github.com/skeema/tengo to bring in a couple Docker fixes, solving these problems: * --workspace=docker with --flavor=mysql:5.7 or percona:5.7 on MacOS would sometimes fail to stop an image properly, requiring it to be manually reset to regain functionality. * Integration tests (especially in the applier package) would sometimes hit issues with stopping 5.7 images on MacOS, causing flakey test failures. * Integration tests would fail with percona:5.6 and percona:5.7 if the image was fetched in the past few weeks, due to a username change in percona/percona-docker#51
asked in this discussion -
docker-library/percona#68 (comment)