Skip to content

Instantly share code, notes, and snippets.

@TMaYaD
Created October 28, 2014 21:23
Show Gist options
  • Save TMaYaD/18e97a1776158fce7fa5 to your computer and use it in GitHub Desktop.
Save TMaYaD/18e97a1776158fce7fa5 to your computer and use it in GitHub Desktop.
install sqlite3 in dokku
#!/bin/bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"
IMAGE="dokku/$1"
PLUGIN_DIR=$(dirname $0)
echo "-----> Injecting sqlite3 ..."
if docker run -a stdout -i $IMAGE /usr/bin/dpkg -s libsqlite3-dev > /dev/null; then
echo "sqlite3 is already installed (skipping apt-get update/install)"
else
echo "sqlite3 is not installed (will install via apt-get)"
id=$(docker run -i -a stdin $IMAGE /bin/bash -c "apt-get update && apt-get install -y libsqlite3-dev && apt-get clean")
test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment