@@ -235,6 +235,52 @@ enough space for the copy; upgrade failure because of not enough space might
235
235
lead to data loss.
236
236
237
237
238
+ Extending image
239
+ ----------------
240
+
241
+ This image can be extended using
242
+ [ source-to-image] ( https://github.com/openshift/source-to-image ) .
243
+
244
+ For example to build customized image ` new-postgresql `
245
+ with configuration in ` ~/image-configuration/ ` run:
246
+
247
+
248
+ ```
249
+ $ s2i build ~/image-configuration/ postgresql new-postgresql
250
+ ```
251
+
252
+ The directory passed to ` s2i build ` should contain one or more of the
253
+ following directories:
254
+
255
+ ##### ` postgresql-config/ `
256
+
257
+ contained files will be included at the end of image postgresql.conf file
258
+
259
+ ##### ` pre-init/ `
260
+
261
+ contained shell scripts (` *.sh ` ) are sourced before ` service ` is started
262
+
263
+ ##### ` init/ `
264
+
265
+ contained shell scripts (` *.sh ` ) are sourced after ` service ` is
266
+ started
267
+
268
+ ----------------------------------------------
269
+
270
+ During ` s2i build ` all provided files are copied into ` /opt/app-root/src `
271
+ directory in the new image. If some configuration files are present in
272
+ destination directory, files with the same name are overwritten. Also only one
273
+ file with the same name can be used for customization and user provided files
274
+ are preferred over default files in ` /usr/share/container-scripts/ ` -
275
+ so it is possible to overwrite them.
276
+
277
+ Same configuration directory structure can be used to customize the image
278
+ every time the image is started using ` docker run ` . The directory have to be
279
+ mounted into ` /opt/app-root/src/ ` in the image (`-v
280
+ ./image-configuration/:/opt/app-root/src/`). This overwrites customization
281
+ built into the image.
282
+
283
+
238
284
Troubleshooting
239
285
---------------
240
286
At first the postgres daemon writes its logs to the standard output, so these are available in the container log. The log can be examined by running:
0 commit comments