<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Isaias Velasquez</title>
    <description>The latest articles on DEV Community by Isaias Velasquez (@isaias_velasquez_d2261770).</description>
    <link>https://dev.to/isaias_velasquez_d2261770</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2784912%2F1f4a67f2-5f91-4c99-9b77-e805933c7564.jpg</url>
      <title>DEV Community: Isaias Velasquez</title>
      <link>https://dev.to/isaias_velasquez_d2261770</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/isaias_velasquez_d2261770"/>
    <language>en</language>
    <item>
      <title>How to free up disk space used by Docker</title>
      <dc:creator>Isaias Velasquez</dc:creator>
      <pubDate>Sat, 04 Jul 2026 07:14:25 +0000</pubDate>
      <link>https://dev.to/isaias_velasquez_d2261770/how-to-free-up-disk-space-used-by-docker-4576</link>
      <guid>https://dev.to/isaias_velasquez_d2261770/how-to-free-up-disk-space-used-by-docker-4576</guid>
      <description>&lt;h1&gt;
  
  
  How to free up disk space used by Docker
&lt;/h1&gt;

&lt;p&gt;When you use Docker on a daily basis, your disk can get full of unnamed images, stopped containers, dangling volumes and build cache. Here is how to clean all that up.&lt;/p&gt;

&lt;p&gt;First, check how much space Docker is using:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker system df
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This will show you images, containers, volumes and build cache with their sizes.&lt;/p&gt;

&lt;p&gt;To remove all stopped containers, dangling images and unused networks in one go:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker system prune -f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you also want to remove dangling volumes:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker system prune -af --volumes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Just be careful with the --volumes flag. Once they are gone, any data stored in anonymous volumes is lost.&lt;/p&gt;

&lt;p&gt;Now if you want to remove only what is old:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker system prune -af --filter "until=24h"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The --filter flag removes everything created or used more than 24 hours ago.&lt;/p&gt;

&lt;p&gt;That's all for now.&lt;br&gt;
Thanks for reading!&lt;/p&gt;

</description>
      <category>cli</category>
      <category>devops</category>
      <category>docker</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to deal with empty lists that defaults to null in Jackson and Kotlin</title>
      <dc:creator>Isaias Velasquez</dc:creator>
      <pubDate>Sat, 04 Jul 2026 07:04:39 +0000</pubDate>
      <link>https://dev.to/isaias_velasquez_d2261770/how-to-deal-with-empty-lists-that-defaults-to-null-in-jackson-and-kotlin-5ai3</link>
      <guid>https://dev.to/isaias_velasquez_d2261770/how-to-deal-with-empty-lists-that-defaults-to-null-in-jackson-and-kotlin-5ai3</guid>
      <description>&lt;h1&gt;
  
  
  How to deal with empty lists that defaults to null in Jackson and Kotlin
&lt;/h1&gt;

&lt;p&gt;Most times using Jackson will be straightforward and we won’t have to fiddle, but in the case you need to deserialize a data class that can have empty lists in Kotlin you can run into a null assertion error. &lt;br&gt;
Here’s a data class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;
    &lt;span class="nd"&gt;@JsonInclude&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;JsonInclude&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Include&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;NON_NULL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;data class&lt;/span&gt; &lt;span class="nc"&gt;SomeDataClass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;otherFieldA&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;
      &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;someOtherDataClassList&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SomeOtherDataClass&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;arrayListOf&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the previous code we have a potential error if payload received is an empty list in the field &lt;em&gt;someOtherDataClassList&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The simplest to this, using Jackson 2.17 (most recent version to the date this article was written) was to declare the Jackson Kotlin Module manually, and instead of using &lt;em&gt;ObjectMapper.registerKotlinModule()&lt;/em&gt;, use this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt; &lt;span class="kd"&gt;object&lt;/span&gt; &lt;span class="nc"&gt;JacksonProvider&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;

      &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;kotlinModule&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;KotlinModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Builder&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;KotlinFeature&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;NullIsSameAsDefault&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

      &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;mapper&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;ObjectMapper&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ObjectMapper&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;registerModule&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kotlinModule&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="p"&gt;.(&lt;/span&gt;&lt;span class="n"&gt;your&lt;/span&gt; &lt;span class="n"&gt;other&lt;/span&gt; &lt;span class="n"&gt;configuration&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that’s it! now you have a working empty list that does not throws an error while using Jackson and Kotlin.&lt;/p&gt;

&lt;p&gt;The needed dependency is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gradle"&gt;&lt;code&gt;  &lt;span class="n"&gt;implementation&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"com.fasterxml.jackson.module:jackson-module-kotlin:2.17.+"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>debugging</category>
      <category>kotlin</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to copy files from a docker container to host</title>
      <dc:creator>Isaias Velasquez</dc:creator>
      <pubDate>Sat, 04 Jul 2026 07:02:35 +0000</pubDate>
      <link>https://dev.to/isaias_velasquez_d2261770/how-to-copy-files-from-a-docker-container-to-host-2i0o</link>
      <guid>https://dev.to/isaias_velasquez_d2261770/how-to-copy-files-from-a-docker-container-to-host-2i0o</guid>
      <description>&lt;h1&gt;
  
  
  How to copy files from a docker container to host
&lt;/h1&gt;

&lt;p&gt;Sometimes we just want to know the content of a generated file into some container. And this is the way to do:&lt;/p&gt;

&lt;p&gt;First of all, make sure the data you want to copy is in container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; docker &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; &amp;lt;container reference&amp;gt; /bin/bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I strongly suggest you to use /bin/bash instead of sh because sh lacks lots of useful features, like autocomplete, command history.&lt;/p&gt;

&lt;p&gt;Then, assured what you need is there, just do it almost like a normal copy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;docker &lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; &amp;lt;container reference&amp;gt;:&amp;lt;container path&amp;gt; &amp;lt;host path&amp;gt;
    Example:
    &lt;span class="nb"&gt;sudo &lt;/span&gt;docker &lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; 3bbef5e21df:/home/fls/ &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference is an ‘-a’ flag which means archive mode. It’ll help you copying with GID|UID information.&lt;/p&gt;

&lt;p&gt;That’s all for now.&lt;br&gt;
Thanks for reading!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>cli</category>
      <category>docker</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
