Skip to content
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

Add an official image for Plone #1434

Merged
merged 25 commits into from Oct 12, 2016
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
061bfe7
Add Plone
avoinea Feb 10, 2016
a8efb5a
Update to the latest stable revision
avoinea Feb 11, 2016
b2137ce
Remove 5 alpine tags until we have a fix for plone/plone.docker#16
avoinea Feb 11, 2016
e3ca822
Update to the latest repo version. Remove bugous alpine tags.
avoinea Mar 3, 2016
1fd05ef
Release Plone 4.3.8
avoinea Mar 17, 2016
72a5312
Release Plone 5.0.3
avoinea Mar 30, 2016
4058b5e
Release Plone 4.3.9 and 5.0.4
avoinea Apr 7, 2016
2c76a7e
Add built-in support for ZEO clustering
avoinea Apr 13, 2016
4712bba
Release Plone 4.3.10 and 5.0.5
avoinea Jul 18, 2016
cd7fd82
Add missing dependency for backup: rsync
avoinea Jul 20, 2016
32a89f1
Fix docker-entrypoint to watch main process instead of the logging one
avoinea Sep 19, 2016
de1c8d0
Merge remote-tracking branch 'upstream/master'
avoinea Sep 19, 2016
c4ec044
Update to new format
avoinea Sep 19, 2016
f2a19b8
Add Plone tests
avoinea Sep 19, 2016
e822608
Merge remote-tracking branch 'upstream/master'
avoinea Sep 19, 2016
7768276
Merge remote-tracking branch 'upstream/master'
avoinea Sep 21, 2016
d87c01b
Update with the latest fixes
avoinea Sep 21, 2016
85e230f
Merge remote-tracking branch 'upstream/master'
avoinea Sep 28, 2016
014e822
Release 4.3.11 and 5.0.6
avoinea Sep 28, 2016
ddb1c2e
Make Add-ons environment variable more user friendly
avoinea Oct 6, 2016
dce1897
Fix issues reported by @tianon
avoinea Oct 8, 2016
6030146
Merge remote-tracking branch 'upstream/master'
avoinea Oct 8, 2016
bfd74b9
Add Antonio De Marinis to maintainers
avoinea Oct 10, 2016
278d4f0
Cleanup plone-addons test
avoinea Oct 11, 2016
744116f
Merge remote-tracking branch 'upstream/master'
avoinea Oct 11, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 43 additions & 0 deletions library/plone
@@ -0,0 +1,43 @@
Maintainers: Alin Voinea alin.voinea@gmail.com (@avoinea),
Sven Strack sven@so36.net (@svx)
Copy link
Member

Choose a reason for hiding this comment

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

Can you add <> around these email addresses please?

ie:

Maintainers: Alin Voinea <alin.voinea@gmail.com> (@avoinea),
             Sven Strack <sven@so36.net> (@svx)

GitRepo: https://github.com/plone/plone.docker.git

Tags: 5.0.6, 5.0, 5, latest
GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
Directory: 5.0/5.0.6/debian

Tags: 5.0.5
GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
Directory: 5.0/5.0.5/debian
Copy link
Member

Choose a reason for hiding this comment

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

Are these old versions officially supported upstream, or are you simply looking to backfill the tags and looking to remove them after they're built? (See also https://github.com/docker-library/official-images#tags-and-aliases)

To put it another way, if there's a problem discovered in 5.0.5, will there be a 5.0.5.1 release, or is that what 5.0.6 is? Is there a compelling reason why a user would need to use 5.0.5 and couldn't upgrade to 5.0.6?

When tags are removed here, they do not get removed from the Docker Hub, so are still available for users to pull as desired.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if there's a problem discovered in 5.0.5, will there be a 5.0.5.1 release, or is that what 5.0.6 is?

5.0.6 is supposed to fix issues in 5.0.5.


Tags: 5.0.4
GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
Directory: 5.0/5.0.4/debian

Tags: 5.0.3
GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
Directory: 5.0/5.0.3/debian

Tags: 5.0.2
GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
Directory: 5.0/5.0.2/debian

Tags: 4.3.11, 4.3, 4
GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
Directory: 4.3/4.3.11/debian

Tags: 4.3.10
GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
Directory: 4.3/4.3.10/debian

Tags: 4.3.9
GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
Directory: 4.3/4.3.9/debian

Tags: 4.3.8
GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
Directory: 4.3/4.3.8/debian

Tags: 4.3.7
GitCommit: 443c34c35e774820621bf5c0966c81c3b45cb284
Directory: 4.3/4.3.7/debian
5 changes: 5 additions & 0 deletions test/config.sh
Expand Up @@ -130,6 +130,11 @@ imageTests+=(
[php:fpm]='
php-fpm-hello-web
'
[plone]='
plone-basics
plone-addons
plone-zeoclient
'
[postgres]='
postgres-basics
postgres-initdb
Expand Down
6 changes: 6 additions & 0 deletions test/tests/plone-addons/expected-std-out.txt
@@ -0,0 +1,6 @@

[buildout]
extends = develop.cfg
develop += src/eea.facetednavigation
eggs += eea.facetednavigation
zcml += eea.facetednavigation-meta
13 changes: 13 additions & 0 deletions test/tests/plone-addons/run.sh
@@ -0,0 +1,13 @@
#!/bin/bash
set -eo pipefail

image="$1"

PLONE_TEST_SLEEP=3
PLONE_TEST_TRIES=5
Copy link
Member

Choose a reason for hiding this comment

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

These appear to be unused in this script. 👍


cname="plone-container-$RANDOM-$RANDOM"
cid="$(docker run -d -e PLONE_DEVELOP=src/eea.facetednavigation -e PLONE_ADDONS=eea.facetednavigation -e PLONE_ZCML=eea.facetednavigation-meta --name "$cname" "$image" cat)"
Copy link
Member

Choose a reason for hiding this comment

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

This container will likely be dead by the time thedocker exec below tries to execute and would then fail. Maybe just replace it all with a docker run -i --rm -e .... cat custom.cfg. Plus we would get to drop the trap 😄.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yosifkit

Fixed it. Thank you!

trap "docker rm -vf $cid > /dev/null" EXIT

docker exec -it "$cname" cat custom.cfg
Copy link
Member

Choose a reason for hiding this comment

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

The -it here will actually cause trouble in some situations where these get run (no TTY available, for example), so this should just be docker exec "$cname" ...

38 changes: 38 additions & 0 deletions test/tests/plone-basics/run.sh
@@ -0,0 +1,38 @@
#!/bin/bash
set -eo pipefail

dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"

image="$1"

PLONE_TEST_SLEEP=3
PLONE_TEST_TRIES=5

cname="plone-container-$RANDOM-$RANDOM"
cid="$(docker run -d --name "$cname" "$image")"
trap "docker rm -vf $cid > /dev/null" EXIT

get() {
docker run --rm -i \
--link "$cname":plone \
--entrypoint python \
"$image" \
-c "import urllib2; con = urllib2.urlopen('$1'); print con.read()"
Copy link
Member

Choose a reason for hiding this comment

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

Indentation here should be tabs, not spaces. 🙏

}

get_auth() {
docker run --rm -i \
--link "$cname":plone \
--entrypoint python \
"$image" \
-c "import urllib2; request = urllib2.Request('$1'); request.add_header('Authorization', 'Basic $2'); print urllib2.urlopen(request).read()"
}


. "$dir/../../retry.sh" --tries "$PLONE_TEST_TRIES" --sleep "$PLONE_TEST_SLEEP" get "http://plone:8080"

# Plone is up and running
[[ $(get 'http://plone:8080') == *"Plone is up and running"* ]]

# Create a Plone site
[[ $(get_auth 'http://plone:8080/@@plone-addsite' 'YWRtaW46YWRtaW4=') == *"Create a Plone site"* ]]
Copy link
Member

Choose a reason for hiding this comment

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

Can you replace this magic auth string with "$(echo -n 'admin:admin' | base64)" instead so it's more clear at a glance what this is (and easier to update if the defaults ever change)?

Copy link
Member

Choose a reason for hiding this comment

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

Also, both these tests should be quoted, ie:

# Plone is up and running
[[ "$(get 'http://plone:8080')" == *"Plone is up and running"* ]]

# Create a Plone site
[[ "$(get_auth 'http://plone:8080/@@plone-addsite' "$(echo -n 'admin:admin' | base64)")" == *"Create a Plone site"* ]]

44 changes: 44 additions & 0 deletions test/tests/plone-zeoclient/run.sh
@@ -0,0 +1,44 @@
#!/bin/bash
set -eo pipefail

dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"

image="$1"

PLONE_TEST_SLEEP=3
PLONE_TEST_TRIES=5

# Start ZEO server
zname="zeo-container-$RANDOM-$RANDOM"
zid="$(docker run -d --name "$zname" "$image" zeoserver)"

# Start Plone as ZEO Client
pname="plone-container-$RANDOM-$RANDOM"
pid="$(docker run -d --name "$pname" --link=$zname:zeo -e ZEO_ADDRESS=zeo:8100 "$image")"

# Tear down
trap "docker rm -vf $pid $zid > /dev/null" EXIT

get() {
docker run --rm -i \
--link "$pname":plone \
--entrypoint python \
"$image" \
-c "import urllib2; con = urllib2.urlopen('$1'); print con.read()"
}

get_auth() {
docker run --rm -i \
--link "$pname":plone \
--entrypoint python \
"$image" \
-c "import urllib2; request = urllib2.Request('$1'); request.add_header('Authorization', 'Basic $2'); print urllib2.urlopen(request).read()"
}

. "$dir/../../retry.sh" --tries "$PLONE_TEST_TRIES" --sleep "$PLONE_TEST_SLEEP" get "http://plone:8080"

# Plone is up and running
[[ $(get 'http://plone:8080') == *"Plone is up and running"* ]]

# Create a Plone site
[[ $(get_auth 'http://plone:8080/@@plone-addsite' 'YWRtaW46YWRtaW4=') == *"Create a Plone site"* ]]
Copy link
Member

Choose a reason for hiding this comment

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

Same comments as the previous test.