You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
991 B

# import trusted fingerprints
mkdir "$HOME/.ssh"
echo "$SSH_HOST_KEY" > "$HOME/.ssh/known_hosts"
# use a custom ssh key for git
export GIT_SSH_COMMAND="ssh -i ""$SSH_PRIVATE_KEY"""
# update swarm-nat
# use until allows public access
docker pull
while :; do
# check if the git repository already got cloned
if [ -d .git ]; then
# update the git repository
git pull
# no repository found; do an initial clone
git clone "$REPOSITORY" .
# run the actual swarm-nat docker container
# use docker instead of running it directly to use --cap-add
# use until allows public access
docker run --rm --net=host --cap-add=NET_ADMIN --volume /var/run/docker.sock:/var/run/docker.sock --volume /cephfs/lubiland-lubinat/lubidock/stacks:/stacks
sleep 60