Skip to content

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

@kreczko

Description

@kreczko

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions