Skip to content

Instantly share code, notes, and snippets.

@adastreamer
Created May 19, 2017 19:08
Show Gist options
  • Save adastreamer/33d7e747d893608fbbc6cdeddc7404a0 to your computer and use it in GitHub Desktop.
Save adastreamer/33d7e747d893608fbbc6cdeddc7404a0 to your computer and use it in GitHub Desktop.
An example of Docker entrypoint which does an exec of RUN command
#!/bin/bash
echo "Seeding the files..."
if [ ! -f /data/.do_not_init_me ]; then
echo "Copying the initial files..."
rm -rf /data/.* 2> /dev/null
cp -pri /data_init/. /data/
else
echo "Skipping the initial seeding!"
fi
exec $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment