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

entrypoint does not successfully restart the service #1

Open
almereyda opened this Issue May 27, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@almereyda
Member

almereyda commented May 27, 2016

An error occurs when an existing container is started again.
The initial setup procedure doesn't seem to be skipped properly.

From docker-compose logs mediawiki:

mediawiki_1 | PHP Notice:  Undefined index: MEDIAWIKI_DB_TYPE in - on line 4
mediawiki_1 | ln: failed to create symbolic link './COPYING': File exists
mediawiki_1 | ln: failed to create symbolic link './CREDITS': File exists
mediawiki_1 | ln: failed to create symbolic link './FAQ': File exists
mediawiki_1 | ln: failed to create symbolic link './Gemfile': File exists
mediawiki_1 | ln: failed to create symbolic link './Gemfile.lock': File exists
mediawiki_1 | ln: failed to create symbolic link './Gruntfile.js': File exists
mediawiki_1 | ln: failed to create symbolic link './HISTORY': File exists
mediawiki_1 | ln: failed to create symbolic link './INSTALL': File exists
mediawiki_1 | ln: failed to create symbolic link './README': File exists
mediawiki_1 | ln: failed to create symbolic link './README.mediawiki': File exists
mediawiki_1 | ln: failed to create symbolic link './RELEASE-NOTES-1.27': File exists
mediawiki_1 | ln: failed to create symbolic link './Rakefile': File exists
mediawiki_1 | ln: failed to create symbolic link './StartProfiler.sample': File exists
mediawiki_1 | ln: failed to create symbolic link './UPGRADE': File exists
mediawiki_1 | ln: failed to create symbolic link './api.php': File exists
mediawiki_1 | ln: failed to create symbolic link './autoload.php': File exists
mediawiki_1 | ln: failed to create symbolic link './cache': File exists
mediawiki_1 | ln: failed to create symbolic link './composer.json': File exists
mediawiki_1 | ln: failed to create symbolic link './docs': File exists
mediawiki_1 | ln: failed to create symbolic link './extensions': File exists
mediawiki_1 | ln: failed to create symbolic link './images': File exists
mediawiki_1 | ln: failed to create symbolic link './img_auth.php': File exists
mediawiki_1 | ln: failed to create symbolic link './includes': File exists
mediawiki_1 | ln: failed to create symbolic link './index.php': File exists
mediawiki_1 | ln: failed to create symbolic link './jsduck.json': File exists
mediawiki_1 | ln: failed to create symbolic link './languages': File exists
mediawiki_1 | ln: failed to create symbolic link './load.php': File exists
mediawiki_1 | ln: failed to create symbolic link './maintenance': File exists
mediawiki_1 | ln: failed to create symbolic link './mw-config': File exists
mediawiki_1 | ln: failed to create symbolic link './opensearch_desc.php': File exists
mediawiki_1 | ln: failed to create symbolic link './package.json': File exists
mediawiki_1 | ln: failed to create symbolic link './phpcs.xml': File exists
mediawiki_1 | ln: failed to create symbolic link './profileinfo.php': File exists
mediawiki_1 | ln: failed to create symbolic link './resources': File exists
mediawiki_1 | ln: failed to create symbolic link './serialized': File exists
mediawiki_1 | ln: failed to create symbolic link './skins': File exists
mediawiki_1 | ln: failed to create symbolic link './tests': File exists
mediawiki_1 | ln: failed to create symbolic link './thumb.php': File exists
mediawiki_1 | ln: failed to create symbolic link './thumb_handler.php': File exists
mediawiki_1 | ln: failed to create symbolic link './vendor': File exists
mediawiki_1 | ln: failed to create symbolic link './wiki.phtml': File exists
wikibase_mediawiki_1 exited with code 1

@species Any ideas?

The regular image > container maintenance worked well today with https://lab.allmende.io/transformap/docker-compose-wikibase

docker-compose stop mediawiki
docker-compose rm mediawiki
vim mediawiki-docker/Dockerfile
vim mediawiki-docker/entrypoint.sh
docker-compose build mediawiki
docker-compose up mediawiki

Make sure to change something in the Dockerfile so the Docker build cache is invalidated and refreshed.

@tayloj

This comment has been minimized.

Show comment
Hide comment
@tayloj

tayloj Mar 30, 2017

The docker-entrypoint.sh script that gets copied to the image unconditionally tries to create symlinks of everything in /usr/src/mediawiki into /var/www/html. That really should only happen the first time that the server is set up. So, I don't think this is a real fix for the issue, but a workaround is the following change that forces the symlinks.

diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index 37e7d33..40c14b9 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -115,7 +115,7 @@ EOPHP
 
 cd /var/www/html
 # FIXME: Keep php files out of the doc root.
-ln -s /usr/src/mediawiki/* .
+ln -sf /usr/src/mediawiki/* .
 
 : ${MEDIAWIKI_SHARED:=/data}
 if [ -d "$MEDIAWIKI_SHARED" ]; then

tayloj commented Mar 30, 2017

The docker-entrypoint.sh script that gets copied to the image unconditionally tries to create symlinks of everything in /usr/src/mediawiki into /var/www/html. That really should only happen the first time that the server is set up. So, I don't think this is a real fix for the issue, but a workaround is the following change that forces the symlinks.

diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
index 37e7d33..40c14b9 100755
--- a/docker-entrypoint.sh
+++ b/docker-entrypoint.sh
@@ -115,7 +115,7 @@ EOPHP
 
 cd /var/www/html
 # FIXME: Keep php files out of the doc root.
-ln -s /usr/src/mediawiki/* .
+ln -sf /usr/src/mediawiki/* .
 
 : ${MEDIAWIKI_SHARED:=/data}
 if [ -d "$MEDIAWIKI_SHARED" ]; then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment