Skip to content

Only chown things in the entrypoint that are not already owned by redis #166

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
Sep 28, 2018

Conversation

Copy link
Member

@itamarhaber itamarhaber left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

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

LGTM

@tianon tianon merged commit 95c7574 into redis:master Sep 28, 2018
@tianon tianon deleted the chown branch September 28, 2018 17:58
tianon added a commit to infosiftr/stackbrew that referenced this pull request Oct 1, 2018
- `busybox`: 1.29.3, Buildroot 2018.08, Alpine 3.8
- `cassandra`: fix `cassandra.yaml` modification (docker-library/cassandra#160), `chown` fixes (docker-library/cassandra#158)
- `ghost`: `chown` fixes (docker-library/ghost#153)
- `julia`: 1.0.1
- `mariadb`: `chown` fixes (MariaDB/mariadb-docker#203)
- `mongo`: `chown` fixes (docker-library/mongo#305)
- `openjdk`: Oracle variants (docker-library/openjdk#235), 11 GA
- `owncloud`: `chown` fixes (docker-library/owncloud#105)
- `percona`: `chown` fixes (docker-library/percona#69)
- `php`: 7.3.0RC2
- `rabbitmq`: `chown` fixes (docker-library/rabbitmq#281)
- `redis`: `chown` fixes (redis/docker-library-redis#166)
- `redmine`: `chown` fixes (docker-library/redmine#128)
- `ruby`: Alpine thread stack size fix (docker-library/ruby#237)
- `tomcat`: add JRE 11, remove EOL Tomcat 8.0 (docker-library/tomcat#133)
kocolosk added a commit to apache/couchdb-docker that referenced this pull request Oct 18, 2018
Recursive modification of ownership and permissions in the entrypoint
has been implicated in slow container startup times. This change checks
the ownership first and only modifies it if necessary. It is modeled
after similar changes recently applied to a number of other projects
e.g. redis/docker-library-redis#166.
kocolosk added a commit to apache/couchdb-docker that referenced this pull request Oct 20, 2018
Recursive modification of ownership and permissions in the entrypoint
has been implicated in slow container startup times. This change checks
the ownership first and only modifies it if necessary. It is modeled
after similar changes recently applied to a number of other projects
e.g. redis/docker-library-redis#166.
kocolosk added a commit to apache/couchdb-docker that referenced this pull request Oct 20, 2018
Recursive modification of ownership and permissions in the entrypoint
has been implicated in slow container startup times. This change checks
the ownership first and only modifies it if necessary. It is modeled
after similar changes recently applied to a number of other projects
e.g. redis/docker-library-redis#166.
wohali pushed a commit to apache/couchdb-docker that referenced this pull request Oct 20, 2018
* Chown files in /opt/couchdb only when necessary

Recursive modification of ownership and permissions in the entry point
has been implicated in slow container startup times. This change checks
the ownership first and only modifies it if necessary. It is modelled
after similar changes recently applied to a number of other projects
e.g. redis/docker-library-redis#166.

* Chmod data files only if necessary

Previously we had been doing a blanket recursive chmod to 770 on
everything in the datadir. This had a few problems:

- The files themselves need not have the executable bit set
- CouchDB itself creates directories and files with 755/644
- Executing lots of chmod operations caused startup delays

This patch makes the execution of chmod conditional, and works to set
the permissions to what they would normally be when CouchDB creates the
the files and directories.

* Chmod config files only if necessary

This patch also drops the target permissions from 775/664 to 755/644,
as the latter permissions are the ones set by the CouchDB installation
itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants