Skip to content
This repository was archived by the owner on Nov 8, 2019. It is now read-only.
Open
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
4 changes: 2 additions & 2 deletions postgresql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM index.docker.io/fedora:23
FROM index.docker.io/fedora:24
MAINTAINER Pavel Raiskup <praiskup@redhat.com>

ENV container="docker"
Expand All @@ -14,7 +14,7 @@ RUN dnf -y --setopt=tsflags=nodocs install postgresql-server \
ADD "root" \
"/"

RUN systemctl disable getty.service console-getty.service \
RUN systemctl disable console-getty.service \
&& systemctl enable postgresql-container.service \
&& touch /var/lib/pgsql/data/.container_internal && chown 26:26 /var/lib/pgsql/data \
&& container-build && rm /usr/bin/container-build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ User=postgres
Group=postgres

# Location of database directory
Environment=PGDATA=/var/lib/pgsql/data
Environment=PGDATA=/var/lib/pgsql/data/data

# Where to send early-startup messages from the server (before the logging
# options of postgresql.conf take effect)
Expand Down
4 changes: 2 additions & 2 deletions postgresql/root/usr/share/cont-docs/postgresql.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
PostgreSQL in container
=======================

API Version: 1.0.1
API Version: 1.0.2

Documentation
-------------

You are encouraged to install this alias into your environment:

$ alias pgcont_help='docker run --rm THIS_IMAGE container-help --component postgresql'
$ alias pgcont_help='docker run --rm fedora/postgresql container-help --component postgresql'

Please consult documentation for PostgreSQL component via:

Expand Down
2 changes: 1 addition & 1 deletion postgresql/root/usr/share/cont-docs/postgresql/HOME.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ General documentation for PostgreSQL container usage. Most of this
documentation describes only proof-of-concept implemented ideas. Be careful not
to rely described API too much because it is still expected to change very fast.

Note that this is for 1.0.1 API
Note that this is for 1.0.2 API
(MAJOR.MINOR.FIX). Any change in MAJOR part of version introduces backward
incompatibility (you should take into account that interchanging MAJOR container
with MAJOR+N container will need some manual changes in your tooling). On the
Expand Down
11 changes: 11 additions & 0 deletions postgresql/root/usr/share/cont-docs/postgresql/NEWS.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
News in 1.0.2

* New features:

- the default help message is able to reference appropriate image name

* Bugfixes:

- running via containerized systemd again works, this is better documented


New in 1.0.1

* dnf reinstall fails if the package has been updated in the meantime,
Expand Down
20 changes: 20 additions & 0 deletions postgresql/root/usr/share/cont-docs/postgresql/advanced.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,26 @@ POSTGRESQL_PASSWORD=STRING
by given user.


Systemd-based image
-------------------

This image (fedora/postgresql) allows you to start multi-process
container via systemd. You can easily achive this by running:

$ docker run -it --rm -u root \
-v /run -v /tmp \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
fedora/postgresql \
/usr/lib/systemd/systemd

As you can see, the steps that you need to do (compared with regular docker-run
command for fedora/postgresql) is to:

- mount some additional directories into container
- specify that you wan't to run the container as root
- specify /usr/lib/systemd/systemd docker's "main" command


Usage on Atomic host (tech-preview feature, not supported)
----------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions postgresql/update
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version=1.0.1
version=1.0.2

clean()
{
Expand All @@ -16,7 +16,7 @@ build()
git pull
git checkout v$version
git submodule update --init
make DESTDIR=../
make DESTDIR=../ docker_main_tag=fedora/postgresql
)

clean
Expand Down