🐋
Docker - From Dev to Production
Updated At
May 5, 2021 02:42 PM
Created
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 be spinning up databases! But I could never quite understand how I'd be able to deploy an application using Docker. Pipelines that built a zip archive and deployed it felt so familiar and understandable - like an FTP upload. 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!)
Outline
  • 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