Skip to content

Instantly share code, notes, and snippets.

@plasticine
Last active July 17, 2018 06:17
Show Gist options
  • Save plasticine/364fca8e7ba5e1fa0878eed7d14fbbaa to your computer and use it in GitHub Desktop.
Save plasticine/364fca8e7ba5e1fa0878eed7d14fbbaa to your computer and use it in GitHub Desktop.
# Foundation Target (install system runtime deps)
FROM xyz:1.0@sha256:abcd1234 AS foundation
# Runtime deps and common environment stuff here
# Build Target (install system buildtime deps)
FROM foundation AS build
# Install build-time systems deps and things here, we don’t want/need these in production
# Development Target (development toolchain)
FROM build AS development
# Install any big, dumb development tooling here, this is what you’re using locally
# Compile Target (static assets)
FROM build AS compile
# Any static compilation that needs to happen...
# Test Target (development + static assets)
FROM development AS test
# Copy files from compile target
# Production Gem Bundle Target (minimal bundle)
FROM build AS bundle
# Bundle the app for production, trim anything extra
# Production Target (minimal af)
FROM foundation AS production
# Copy files from bundle target
# Copy files from compile target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment