ambakshi / docker-perforce

Docker Perforce Images (p4d, perforce-swarm, git-fusion, sample depot, and a base image)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Container immediately exits because log file has moved

kduda opened this issue · comments

Hello,

A simple docker run --publish-all -e P4PASSWD=... -d ambakshi/perforce-server does not work because the container immediately exits with:

/usr/bin/tail: cannot open '/data/p4depot/log' for reading: No such file or directory

That's because of the last line of run.sh:

exec /usr/bin/tail --pid=$(cat /var/run/p4d.$NAME.pid) -f "$DATAVOLUME/$NAME/log"

The pathname to the perforce log file is incorrect. The correct pathname is $DATAVOLUME/$NAME/logs/log:

# cat $DATAVOLUME/$NAME/logs/log
Perforce server info:
	Perforce db files in '/data/p4depot/root' will be created if missing...
Perforce server info:
	Perforce Server starting 2019/04/11 15:25:26 pid 243
...

Obviously, the last line of run.sh should read:

exec /usr/bin/tail --pid=$(cat /var/run/p4d.$NAME.pid) -f "$DATAVOLUME/$NAME/logs/log"

Would you like me to submit a patch or pull request?

Thanks,
-Ken

I had this same issue and I fixed it so I'll submit a pull request. Feel free to merge it if you like :)