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

Replacing cubied with docker best practice in cvmfs-base #20

Open
kreczko opened this issue Sep 6, 2017 · 1 comment
Open

Replacing cubied with docker best practice in cvmfs-base #20

kreczko opened this issue Sep 6, 2017 · 1 comment

Comments

@kreczko
Copy link
Collaborator

kreczko commented Sep 6, 2017

Today I've been trying to fix an issue related to running a cvmfs container with the gitlab-runner.
I have been seeing plenty of messages like these

2017/09/06 08:42:46 running [sh -c if [ -x /usr/local/bin/bash ]; then
	exec /usr/local/bin/bash 
elif [ -x /usr/bin/bash ]; then
	exec /usr/bin/bash 
elif [ -x /bin/bash ]; then
	exec /bin/bash 
elif [ -x /usr/local/bin/sh ]; then
	exec /usr/local/bin/sh 
elif [ -x /usr/bin/sh ]; then
	exec /usr/bin/sh 
elif [ -x /bin/sh ]; then
	exec /bin/sh 
else
	echo shell not found
	exit 1
fi

which is due to how the gitlab-runner probes the shell.

After a bit of research I've encountered
https://forums.docker.com/t/best-practice-to-run-a-bash-setup-script-after-creation-of-container/28988/2

Following that I've modified /etc/cvmfs/run-cvmfs.sh to

#!/usr/bin/env bash
echo "::: cvmfs-config..."
cvmfs_config setup || exit 1

echo "::: mounting FUSE..."
mount -a
echo "::: mounting FUSE... [done]"

exec "$@"

and changed the docker file to

ENTRYPOINT ["/etc/cvmfs/run-cvmfs.sh"]
CMD ["bash"]

which got rid of these extra messages.

In short, shall I make a pull request changing cvmfs-base to follow this procedure?

@sbinet
Copy link
Contributor

sbinet commented Sep 6, 2017

sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants