Skip to content

Instantly share code, notes, and snippets.

@TimWSpence
Last active July 31, 2019 17:14
Show Gist options
  • Save TimWSpence/8c1e3b203c397eff46cfb168a346beee to your computer and use it in GitHub Desktop.
Save TimWSpence/8c1e3b203c397eff46cfb168a346beee to your computer and use it in GitHub Desktop.
Build script for optimized multistage Docker build for Haskell Stack
docker pull ns/app-dependencies:latest || true
docker build --target dependencies --cache-from ns/app-dependencies:latest -t ns/app-dependencies .
docker build --target app --cache-from ns/app-dependencies:latest -t ns/app .
docker push ns/app-dependencies:latest
docker push ns/app:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment