@@ -112,25 +112,24 @@ RUN set -xe; \
112
112
chmod 777 /opt/couchdb/data /opt/couchdb/var/log; \
113
113
# Remove file that sets logging to a file
114
114
rm /opt/couchdb/etc/default.d/10-filelog.ini; \
115
- rm -rf /var/lib/apt/lists/*
116
-
117
- # Add configuration
118
- COPY 10-docker-default.ini /opt/couchdb/etc/default.d/
119
- COPY vm.args /opt/couchdb/etc/
120
- COPY docker-entrypoint.sh /usr/local/bin
121
- RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat
122
- ENTRYPOINT ["tini" , "--" , "/docker-entrypoint.sh" ]
123
-
124
-
125
- RUN set -xe; \
126
115
# Check we own everything in /opt/couchdb. Matches the command in dockerfile_entrypoint.sh
127
116
find /opt/couchdb \! \( -user couchdb -group couchdb \) -exec chown -f couchdb:couchdb '{}' +; \
128
117
# Setup directories and permissions for config. Technically these could be 555 and 444 respectively
129
118
# but we keep them as 755 and 644 for consistency with CouchDB defaults and the dockerfile_entrypoint.sh.
130
119
find /opt/couchdb/etc -type d ! -perm 0755 -exec chmod -f 0755 '{}' +; \
131
120
find /opt/couchdb/etc -type f ! -perm 0644 -exec chmod -f 0644 '{}' +; \
132
121
# only local.d needs to be writable for the docker_entrypoint.sh
133
- chmod -f 0777 /opt/couchdb/etc/local.d
122
+ chmod -f 0777 /opt/couchdb/etc/local.d; \
123
+ # apt clean-up
124
+ rm -rf /var/lib/apt/lists/*;
125
+
126
+ # Add configuration
127
+ COPY --chown=couchdb 10-docker-default.ini /opt/couchdb/etc/default.d/
128
+ COPY --chown=couchdb vm.args /opt/couchdb/etc/
129
+
130
+ COPY docker-entrypoint.sh /usr/local/bin
131
+ RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat
132
+ ENTRYPOINT ["tini" , "--" , "/docker-entrypoint.sh" ]
134
133
135
134
VOLUME /opt/couchdb/data
136
135
0 commit comments