<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Docker on Mateusz Cholewka</title><link>https://mateuszcholewka.com/categories/docker/</link><description>Recent content in Docker on Mateusz Cholewka</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 14 Oct 2021 18:35:18 +0200</lastBuildDate><atom:link href="https://mateuszcholewka.com/categories/docker/index.xml" rel="self" type="application/rss+xml"/><item><title>Use single Dockerfile for development and production</title><link>https://mateuszcholewka.com/post/single-dockerfile-dev-prod/</link><pubDate>Mon, 11 Oct 2021 00:00:00 +0000</pubDate><guid>https://mateuszcholewka.com/post/single-dockerfile-dev-prod/</guid><description>&lt;p>I have been wondering for a really long time how to keep up to date the Dockerfiles in my project. I&amp;rsquo;ve always had two of them, one for the dev environment, and the second one for building my production container with dependencies, code build, etc. If I needed to change something I had to update both files.&lt;/p>
&lt;p>I knew that dockerfiles allow us to define multiple stages, and I had used them, but still had a problem. In my production dockerfile I had stages, like building my frontend application and installing backend dependencies and final stage. I don&amp;rsquo;t need my code inside the container for development, because I attach my code using volume, so there is no reason to increase the building time of the development environment. So for the dev environment, I was using another one dockerfile.&lt;/p></description></item></channel></rss>