Closed tom-tan closed 8 years ago
Thanks for reporting issues you're having.
You're right on the logic that's in https://github.com/wernight/docker-codiad/blob/master/root/entrypoint.sh however that directectory should exist from https://github.com/wernight/docker-codiad/blob/master/Dockerfile#L58 : git clone https://github.com/Codiad/Codiad /default-code
. So it should create that /code/.git
directory.
I have it running but my /code
contains .git
.
Before putting a harder fix, I'd like to understand why it's not working as it should. May be you can check that directory content, access rights, or not mounting and docker exec
in that container to check the content.
however that directectory should exist from https://github.com/wernight/docker-codiad/blob/master/Dockerfile#L58 .
/default-code/.git
exists but it is not copied by entrypoint.sh
because the wildcard *
does not match the files and directories which start with .
in bash, zsh and other shells.
Ah of course. Fixing
I confirmed it works. Thanks!
How to reproduce:
-v
option to hold the configuration.$PWD/code/config.php
. For example, add the following line toconfig.php
:config.php
.Expected: I can find the line
define("LANGUAGE", "ja");
. Actual: There are no linedefine("LANGUAGE", "ja");
becauseconfig.php
is overwritten by/default-code/config.php
.The reason is that the statement
[ ! -d '/code/.git' ]
inentrypoint.sh
always becomes true. This script expects that there exists/code/.git
after installing Codiad but the linecp -r /default-code/* /code
skip copying/default-code/.git
.A simple workaround is just to make a directory
/code/.git
after copying the contents.