Docker - From Dev to Production
Updated At
Apr 5, 2021 06:51 PM
Apr 3, 2021 06:13 PM
For the longest time I had been happily pulling down images into a local docker-compose environment for working on development projects. It brought joy to spinning up databases! But I could never quite understand how I'd ever be able to deploy an application using Docker. Pipelines that built a zip and deployed it felt so familiar. Here's my journey to using Docker in production (note to self: you're not technically using it in production get so better hold on a few weeks!)
  • Many use docker in dev but don't know how they can ship production images
    • Only ship what you need
    • It's okay that your images are different between dev and prod
    • Multi-stage builds let you reduce size but not lose out on conciseness and DX
  • Tagging your builds
    • Tagging the git SHA or Build Number (or both) can be very useful