<?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>Forem: Navneet Karnani</title>
    <description>The latest articles on Forem by Navneet Karnani (@mandraketech).</description>
    <link>https://forem.com/mandraketech</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F140699%2Faf7b8d74-9053-4586-a1fa-8aa3e3868333.png</url>
      <title>Forem: Navneet Karnani</title>
      <link>https://forem.com/mandraketech</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mandraketech"/>
    <language>en</language>
    <item>
      <title>Stop Using localhost:8080 - Why Your Dev Environment Needs Production-Grade Network Security</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Fri, 05 Dec 2025 21:55:29 +0000</pubDate>
      <link>https://forem.com/mandraketech/stop-using-localhost8080-why-your-dev-environment-needs-production-grade-network-security-2dao</link>
      <guid>https://forem.com/mandraketech/stop-using-localhost8080-why-your-dev-environment-needs-production-grade-network-security-2dao</guid>
      <description>&lt;p&gt;Modern application development increasingly demands security-first approaches, but setting up a secure local development environment that mirrors production constraints is often overlooked. In this post, I'll walk you through a Docker-based Java development environment that enforces network segmentation, egress filtering, secure ingress with TLS, and production-like browser behavior all running locally.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Security Theater in Development
&lt;/h2&gt;

&lt;p&gt;Most development environments are security-free zones. Your application can reach any endpoint, pull dependencies from anywhere, and communicate freely with the outside world. Developers typically use &lt;code&gt;http://localhost:8080&lt;/code&gt;, which creates a dangerous illusion: if it works on your laptop, it's ready for production.&lt;/p&gt;

&lt;p&gt;The reality? Production environments have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Strict firewall rules blocking unexpected egress&lt;/li&gt;
&lt;li&gt;Network segmentation preventing lateral movement&lt;/li&gt;
&lt;li&gt;Ingress proxies enforcing TLS and security headers&lt;/li&gt;
&lt;li&gt;HTTPS with all its browser security implications&lt;/li&gt;
&lt;li&gt;Audit logging of all network activity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Discovering these constraints during deployment is expensive. Worse, it trains developers to see security as friction rather than design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This article presents a different approach&lt;/strong&gt; : a Docker-based development environment where security constraints are the default, not an afterthought. You'll learn production network patterns while writing code, not while debugging a failed deployment.&lt;/p&gt;

&lt;p&gt;The patterns shown here translate directly to production Docker deployments. Whether you scale to orchestration later or keep it simple with Docker Compose in production, these principles remain the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: Network-Segmented Docker Environment
&lt;/h2&gt;

&lt;p&gt;This architecture enforces network boundaries at the container level, giving you production-like security constraints during development.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architecture Overview
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                        Internet Egress egress-net (Squid) Ingress ingress-net App (Caddy) (Java) ports 80/443 (host exposed) Database db-net (PostgreSQL)                                       
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Four isolated networks enforce strict communication paths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;db-net&lt;/strong&gt; : App Database only&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ingress-net&lt;/strong&gt; : App Ingress proxy only &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;egress-net&lt;/strong&gt; : App Egress proxy only&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;internet&lt;/strong&gt; : Egress External internet only&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The app container cannot reach the internet directly all outbound traffic must go through the Squid proxy.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Environment Provides
&lt;/h2&gt;

&lt;p&gt;This setup gives you:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network segmentation&lt;/strong&gt; - Services can only communicate on explicitly allowed networks&lt;br&gt;&lt;br&gt;
 &lt;strong&gt;Egress filtering&lt;/strong&gt; - Outbound traffic is whitelisted by domain&lt;br&gt;&lt;br&gt;
 &lt;strong&gt;Ingress hardening&lt;/strong&gt; - HTTPS termination, security headers, log sanitization&lt;br&gt;&lt;br&gt;
 &lt;strong&gt;Production parity&lt;/strong&gt; - The same constraints your production environment should have&lt;br&gt;&lt;br&gt;
 &lt;strong&gt;HTTPS in development&lt;/strong&gt; - Real browser security behavior, not localhost shortcuts&lt;br&gt;&lt;br&gt;
 &lt;strong&gt;Portable security&lt;/strong&gt; - Works identically on any machine running Docker&lt;/p&gt;

&lt;p&gt;This is &lt;strong&gt;not&lt;/strong&gt; :&lt;br&gt;&lt;br&gt;
 A Kubernetes replacement (it's simpler by design)&lt;br&gt;&lt;br&gt;
 A complete security solution (you still need authentication, authorization, input validation, etc.)&lt;br&gt;&lt;br&gt;
 A performance-optimized production setup (though it can run in production for simpler applications)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Philosophy&lt;/strong&gt; : Docker Compose is sufficient for many production applications. This architecture scales from development through production without requiring orchestration complexity unless you actually need it.&lt;/p&gt;
&lt;h2&gt;
  
  
  Implementation Deep Dive
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. Docker Compose Network Definition
&lt;/h3&gt;

&lt;p&gt;The base &lt;code&gt;docker-compose.yml&lt;/code&gt; defines the infrastructure layer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;networks: ingress-net: internal: true egress-net: internal: true internet:x-proxy-env: &amp;amp;proxy-env http_proxy: http://egress:3128 https_proxy: http://egress:3128services: ingress: image: mandraketech.internal/ingress build: context: ./ingress ports: - name: https published: 443 target: 443 - name: http published: 80 target: 80 networks: - ingress-net depends_on: - app egress: image: mandraketech.internal/egress build: context: ./egress networks: - egress-net - internet volumes: - ./egress/squid.conf:/etc/squid/squid.conf:ro - ./egress/domain-lists.d:/etc/squid/domain-lists.d:ro app: environment: &amp;lt;&amp;lt;: *proxy-env networks: - ingress-net - egress-net
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Networks marked &lt;code&gt;internal: true&lt;/code&gt; have no external connectivity&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;x-proxy-env&lt;/code&gt; YAML anchor injects proxy settings into the app container&lt;/li&gt;
&lt;li&gt;Only the &lt;code&gt;internet&lt;/code&gt; network allows external access, and only the egress container uses it&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Understanding Docker's Internal Networks
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;internal: true&lt;/code&gt; flag prevents networks from routing to external destinations. However, Docker's port publishing bypasses this restrictionit operates at the host level, not the network level.&lt;/p&gt;

&lt;p&gt;This might seem contradictory: How can &lt;code&gt;ingress-net&lt;/code&gt; be internal yet expose ports 80/443?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The answer&lt;/strong&gt; : Internal networks restrict &lt;em&gt;container-to-external&lt;/em&gt; routing, not &lt;em&gt;host-to-container&lt;/em&gt; port forwarding. The ingress container:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cannot initiate connections to the internet (internal: true enforces this)&lt;/li&gt;
&lt;li&gt;Can receive connections from the host (port publishing allows this)&lt;/li&gt;
&lt;li&gt;Can communicate with other containers on the same network&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is intentional architecture, not a workaround. It demonstrates an important principle: &lt;strong&gt;network isolation is about controlling who can initiate connections, not just who can receive them.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you want to understand Docker networking at a deeper level, explore the iptables rules Docker creates: &lt;code&gt;sudo iptables -L DOCKER-ISOLATION-STAGE-2 -n -v&lt;/code&gt;. You'll see how internal networks are enforced at the packet filtering level.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Egress Filtering with Squid
&lt;/h3&gt;

&lt;p&gt;The egress proxy uses Squid to whitelist allowed domains. Here's the core configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http_port 3128# Define local network (containers)acl localnet src 172.16.0.0/12acl localnet src 10.0.0.0/8acl localnet src 192.168.0.0/16# Load allowed domains from consolidated fileacl allowed_domains dstdomain "/etc/squid/all-allowed-domains.txt"acl Safe_ports port 80 # httpacl Safe_ports port 443 # httpsacl HTTPS_ports port 443acl CONNECT method CONNECT# Access ruleshttp_access deny !Safe_portshttp_access allow localnet allowed_domains HTTPS_ports# Deny everything elsehttp_access deny all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The whitelist approach means only explicitly allowed domains are accessible. Domain lists are organized by purpose:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;allowed-domains-dev.txt&lt;/strong&gt; (development tools):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# github vscode extensionraw.githubusercontent.comapi.github.com# version controlgithub.comgitlab.com# vscode extensions marketplacemarketplace.visualstudio.commain.vscode-cdn.net.vsassets.io
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;allowed-domains-app.txt&lt;/strong&gt; (Java ecosystem):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# java dependenciesapi.spring.iorepo.maven.apache.orgmaven.apache.orgsearch.maven.orgservices.gradle.orgdocs.oracle.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Dynamic Configuration Reload
&lt;/h3&gt;

&lt;p&gt;The egress container includes a file watcher that automatically reloads Squid when domain lists change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env shconsolidate_files() { echo "Consolidating domain lists..." CONSOLIDATED_DOMAINS_FILE="/etc/squid/all-allowed-domains.txt" echo "" &amp;gt; "$CONSOLIDATED_DOMAINS_FILE" for file in /etc/squid/domain-lists.d/*.txt; do if [-f "$file"]; then cat "$file" &amp;gt;&amp;gt; "$CONSOLIDATED_DOMAINS_FILE" fi done}# Initial consolidationconsolidate_files# Watch for changes and reloadinotifywait -m -e modify,create,delete,move /etc/squid/domain-lists.d |while read -r path action file; do consolidate_files squid -k reconfiguredone &amp;amp;exec /usr/sbin/squid -NYCd 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means you can add new allowed domains without restarting containers.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Secure Ingress with Caddy
&lt;/h3&gt;

&lt;p&gt;The ingress proxy provides HTTPS termination with security headers baked in. Critically, it also sanitizes logs to prevent credential leaks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ admin off skip_install_trust log "console_logger" { format filter { wrap json fields { request&amp;gt;headers&amp;gt;Authorization delete request&amp;gt;headers&amp;gt;Cookie cookie { replace session REDACTED delete secret } request&amp;gt;remote_ip ip_mask { ipv4 16 ipv6 32 } } } format console }}www.localhost { tls internal log "console_logger" header { # HSTS Strict-Transport-Security max-age=31536000; # Prevent MIME sniffing X-Content-Type-Options nosniff # Hide server identity server "super-secure" # Clickjacking protection X-Frame-Options DENY # Referrer policy Referrer-Policy no-referrer # XSS Protection X-XSS-Protection "1; mode=block" } handle /healthy { respond "Running !!!!" 200 } handle /* { reverse_proxy app:8080 } handle_errors { @5xx expression `{err.status_code} &amp;gt;= 500 &amp;amp;&amp;amp; {err.status_code} &amp;lt;600` handle @5xx { respond "It's a 5xx error." } }}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key security features in this configuration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Log sanitization&lt;/strong&gt; : Authorization headers are completely removed, session cookies are marked as REDACTED, and IP addresses are masked to /16 and /32 to protect user privacy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security headers&lt;/strong&gt; : HSTS, X-Frame-Options, X-Content-Type-Options protect against common web vulnerabilities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TLS handling&lt;/strong&gt; : Caddy automatically generates and manages self-signed certificates for local development&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  TLS Configuration for Development
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;www.localhost { tls internal # ... rest of config}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;tls internal&lt;/code&gt; directive tells Caddy to generate a self-signed certificate for &lt;code&gt;www.localhost&lt;/code&gt;. This gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real TLS handshakes&lt;/strong&gt; : Your application sees HTTPS requests exactly as it would in production&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Browser security context&lt;/strong&gt; : APIs that require secure contexts work correctly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security header testing&lt;/strong&gt; : HSTS, CSP, and other headers behave as they would in production&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;First-time setup&lt;/strong&gt; : When you access &lt;code&gt;https://www.localhost&lt;/code&gt;, your browser will warn about the self-signed certificate. This is expected. Click through the warning (the exact process varies by browser):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chrome/Edge&lt;/strong&gt; : Click "Advanced" "Proceed to &lt;a href="http://www.localhost" rel="noopener noreferrer"&gt;www.localhost&lt;/a&gt; (unsafe)"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Firefox&lt;/strong&gt; : Click "Advanced" "Accept the Risk and Continue"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safari&lt;/strong&gt; : Click "Show Details" "visit this website"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After accepting once, your browser remembers the exception for this domain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why not use &lt;code&gt;localhost&lt;/code&gt;?&lt;/strong&gt; The domain &lt;code&gt;www.localhost&lt;/code&gt; is used instead of plain &lt;code&gt;localhost&lt;/code&gt; because it allows testing subdomain behavior (cookies, CORS policies) and more closely mimics production domain structures.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Hidden Value of TLS in Development
&lt;/h3&gt;

&lt;p&gt;Most developers use &lt;code&gt;http://localhost:8080&lt;/code&gt; during development and only encounter HTTPS in production. This creates a dangerous blind spot: browsers behave fundamentally differently under HTTPS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you miss without HTTPS in development:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mixed Content Blocking&lt;/strong&gt; : Browsers block HTTP resources (scripts, stylesheets, images) loaded from HTTPS pages. You won't discover this until production.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Secure Cookie Behavior&lt;/strong&gt; : Cookies marked &lt;code&gt;Secure&lt;/code&gt; are only sent over HTTPS. Session management that works on localhost can fail in production.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Service Worker Restrictions&lt;/strong&gt; : Service Workers only function over HTTPS (except localhost). Progressive Web App features won't work without TLS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CORS Preflight Differences&lt;/strong&gt; : Cross-Origin Resource Sharing behaves differently for HTTPS vs HTTP, particularly with credentials.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HTTP/2 and HTTP/3&lt;/strong&gt; : Modern protocols require TLS. Performance characteristics differ significantly from HTTP/1.1.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Browser Security Features&lt;/strong&gt; : Features like geolocation, camera access, and clipboard API require secure contexts (HTTPS).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Referrer Policy Enforcement&lt;/strong&gt; : Browsers strip or modify referrer headers differently based on protocol security level.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Caddy makes this effortless&lt;/strong&gt; : It automatically generates and manages self-signed certificates for local development. You get real TLS behavior without certificate management overhead.&lt;/p&gt;

&lt;p&gt;This environment uses &lt;code&gt;https://www.localhost&lt;/code&gt; instead of &lt;code&gt;http://localhost:8080&lt;/code&gt;. Your browser will show a certificate warning (expected for self-signed certificates), but after accepting it once, you experience production-like HTTPS behavior during development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Teaching Moment&lt;/strong&gt; : The first time you encounter a mixed content warning during development instead of production, you'll understand why this matters. HTTPS in development isn't about securityit's about production parity.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. The Java Application Container
&lt;/h3&gt;

&lt;p&gt;The app container uses BellSoft Liberica JDK on Alpine for a minimal footprint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ARG JDK_VERSION=25FROM bellsoft/liberica-openjdk-alpine-musl:${JDK_VERSION}RUN apk update &amp;amp;&amp;amp; \ apk add --no-cache \ bash \ git \ curl \ tar \ unzip \ libstdc++ \ ca-certificates \ &amp;amp;&amp;amp; mkdir /codeVOLUME ["/code"]CMD ["sleep", "infinity"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;CMD ["sleep", "infinity"]&lt;/code&gt; is intentional for this development environment. This keeps the container alive for interactive developmentyou exec into it, run builds, start services manually. This is a development pattern, not a production deployment strategy. It allows you to iterate on your application without rebuilding containers constantly.&lt;/p&gt;

&lt;p&gt;The application config extends this in &lt;code&gt;docker-compose.override.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;networks: db-net: internal: trueservices: database: image: postgres:16-alpine environment: POSTGRES_USER: psqladmin POSTGRES_PASSWORD: secret POSTGRES_DB: app_db networks: - db-net app: environment: DB_HOST: database DB_PORT: 5432 volumes: - code_m2:/home/dev/.m2 - code_vol:/code networks: - db-net depends_on: - database
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Debugging Network Restrictions
&lt;/h2&gt;

&lt;p&gt;When egress filtering blocks a request, you need a systematic approach to diagnose and resolve it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing Egress Filtering
&lt;/h3&gt;

&lt;p&gt;The repository includes a test script that validates your proxy configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose exec egress /usr/local/bin/tester.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script attempts connections to various domains and shows which are allowed. &lt;a href="https://gitlab.com/mandraketech/java-secure-dev-env/-/blob/main/egress/tester.sh" rel="noopener noreferrer"&gt;View the full script&lt;/a&gt; to understand the test cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Manual Testing from Application Container
&lt;/h3&gt;

&lt;p&gt;Test specific domains from within the app container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# This should succeed (if whitelisted)docker compose exec app curl -v https://repo.maven.apache.org# This should fail (not whitelisted)docker compose exec app curl -v https://random-site.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Reading Squid Logs
&lt;/h3&gt;

&lt;p&gt;When a request is blocked, Squid logs the denial:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose logs egress | grep TCP_DENIED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll see entries like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1733500800.123 0 172.18.0.5 TCP_DENIED/403 3918 CONNECT random-site.com:443 - HIER_NONE/- text/html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Timestamp&lt;/strong&gt; : When the request occurred&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client IP&lt;/strong&gt; : Which container made the request (172.18.0.5 is the app container)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Action&lt;/strong&gt; : TCP_DENIED/403 means the request was blocked&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain&lt;/strong&gt; : What the app tried to reach&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Decision Tree: Whitelist or Refactor?
&lt;/h3&gt;

&lt;p&gt;When you find a blocked domain, ask:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Is this domain expected?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Yes Add to appropriate whitelist in &lt;code&gt;egress/domain-lists.d/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;No You've found unexpected behavior (possible supply chain issue, investigate)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Does my application really need this dependency?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Example: A logging library that phones home for telemetry&lt;/li&gt;
&lt;li&gt;Consider: Do I need this feature, or can I use a simpler alternative?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Can I cache or vendor this resource?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maven dependencies Cache in your own artifact repository&lt;/li&gt;
&lt;li&gt;External APIs Consider if you need real-time access during development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The friction is intentional. It forces you to understand your application's network footprint.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding Allowed Domains
&lt;/h3&gt;

&lt;p&gt;When you determine a domain should be whitelisted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# For application dependenciesecho "api.example.com" &amp;gt;&amp;gt; egress/domain-lists.d/allowed-domains-app.txt# For development toolsecho "vscode-extension-cdn.com" &amp;gt;&amp;gt; egress/domain-lists.d/allowed-domains-dev.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The proxy automatically reloads within seconds (via inotifywait). No container restart needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Common Issues
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Maven dependencies fail to download:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Check if Maven Central is whitelistedgrep "repo.maven.apache.org" egress/domain-lists.d/allowed-domains-app.txt# Verify proxy environment variables are setdocker compose exec app env | grep proxy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HTTPS connections timeout:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Ensure port 443 is in Safe_portsdocker compose exec egress grep "Safe_ports port 443" /etc/squid/squid.conf# Check if CONNECT method is alloweddocker compose exec egress grep "acl CONNECT method CONNECT" /etc/squid/squid.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Domain is whitelisted but still blocked:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check for typos in the domain list (extra spaces, wrong TLD)&lt;/li&gt;
&lt;li&gt;Verify the file is mounted: &lt;code&gt;docker compose exec egress cat /etc/squid/all-allowed-domains.txt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Ensure Squid was reloaded: &lt;code&gt;docker compose logs egress | grep reconfigure&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  TLS and Certificate Issues
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Browser shows certificate warning every time:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This suggests your browser isn't remembering the certificate exception. Check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Are you using incognito/private mode? These don't persist certificate exceptions.&lt;/li&gt;
&lt;li&gt;Is your browser profile corrupt? Try a fresh profile.&lt;/li&gt;
&lt;li&gt;Did the ingress container restart? Self-signed certificates regenerate on restart, invalidating previous exceptions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Mixed content warnings in browser console:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Mixed Content: The page at 'https://www.localhost/' was loaded over HTTPS, but requested an insecure resource 'http://api.example.com/data'. This request has been blocked.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is expected behavior under HTTPSbrowsers block insecure resources. Solutions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update your code to use HTTPS URLs: &lt;code&gt;https://api.example.com/data&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Use protocol-relative URLs: &lt;code&gt;//api.example.com/data&lt;/code&gt; (inherits page protocol)&lt;/li&gt;
&lt;li&gt;For local resources, ensure they're served through the Caddy proxy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Service Worker registration fails:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This fails: Service Workers need HTTPSnavigator.serviceWorker.register('/sw.js') .catch(err =&amp;gt; console.error('SW registration failed:', err));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify you're accessing via &lt;code&gt;https://www.localhost&lt;/code&gt;, not &lt;code&gt;http://localhost&lt;/code&gt;. Check browser console for security context errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cookies not being sent:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're setting cookies with &lt;code&gt;Secure&lt;/code&gt; flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Cookie cookie = new Cookie("session", sessionId);cookie.setSecure(true); // Only sent over HTTPS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ensure your application is accessed via HTTPS, and the cookie domain matches &lt;code&gt;www.localhost&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters for Your Team
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Security Becomes Muscle Memory
&lt;/h3&gt;

&lt;p&gt;When egress filtering is part of your daily workflow, you naturally think about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What external services does this library contact?&lt;/li&gt;
&lt;li&gt;Do I trust this dependency's network behavior?&lt;/li&gt;
&lt;li&gt;Can I vendor or cache this resource?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't theoretical security questionsthey're practical development constraints you encounter immediately.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Production Surprises Become Development Discoveries
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt; : Your application uses a Java library that contacts a license server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Without this environment&lt;/strong&gt; : You discover this during production deployment when your firewall blocks it. Now you're in an emergency change request to whitelist an unknown domain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With this environment&lt;/strong&gt; : You discover it when you add the dependency. You research the library, understand why it needs network access, and make an informed decisionbefore it's an emergency.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Supply Chain Visibility
&lt;/h3&gt;

&lt;p&gt;Modern applications depend on hundreds of transitive dependencies. Some of these dependencies make network calls you don't expect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analytics that phone home&lt;/li&gt;
&lt;li&gt;License validation checks&lt;/li&gt;
&lt;li&gt;Automatic update checks&lt;/li&gt;
&lt;li&gt;Telemetry collection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Egress filtering makes these visible immediately. You can't ignore what's explicitly blocked.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Simplified Compliance
&lt;/h3&gt;

&lt;p&gt;Many compliance frameworks (PCI-DSS, HIPAA, SOC 2) require:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Network segmentation documentation&lt;/li&gt;
&lt;li&gt;Egress traffic controls&lt;/li&gt;
&lt;li&gt;Audit logs of network activity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This environment provides all three by default. Your development setup becomes documentation of your security model.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Docker in Production, Simplified
&lt;/h3&gt;

&lt;p&gt;This architecture scales to production for applications that don't need orchestration complexity:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Small to medium workloads&lt;/li&gt;
&lt;li&gt;Internal tools and dashboards&lt;/li&gt;
&lt;li&gt;Applications with stable traffic patterns&lt;/li&gt;
&lt;li&gt;Teams that value simplicity over horizontal scaling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same &lt;code&gt;docker-compose.yml&lt;/code&gt; that runs on your laptop can run in production with environment-specific overrides. No translation layer, no impedance mismatch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design Decisions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why Network Isolation Over Firewall Rules
&lt;/h3&gt;

&lt;p&gt;Instead of using firewall rules to prevent communication, we use Docker networks to make prohibited communication impossible. This is more reliable because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Network isolation is enforced by the platform itself, not by rules that can be misconfigured&lt;/li&gt;
&lt;li&gt;It's self-documentinglooking at the compose file shows exactly what can communicate&lt;/li&gt;
&lt;li&gt;There's no "forgot to add a rule" risk&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Whitelist Over Blacklist for Egress
&lt;/h3&gt;

&lt;p&gt;The egress proxy uses domain whitelisting rather than blacklisting. This fail-closed approach is superior because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can't blacklist threats you haven't thought of&lt;/li&gt;
&lt;li&gt;A whitelist explicitly documents what your application needs&lt;/li&gt;
&lt;li&gt;Unknown domains are denied by defaultthe secure path of least resistance&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Containerized Infrastructure
&lt;/h3&gt;

&lt;p&gt;Every component (app, database, ingress, egress) is containerized. This provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consistency&lt;/strong&gt; : Same behavior across development machines and production&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reproducibility&lt;/strong&gt; : New team members get the exact same environment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource management&lt;/strong&gt; : CPU and memory limits prevent runaway containers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clear dependencies&lt;/strong&gt; : Each service's requirements are documented in code&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why Docker Compose Override Pattern
&lt;/h3&gt;

&lt;p&gt;Separating base infrastructure from application configuration in two compose files allows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reusability&lt;/strong&gt; : The same infrastructure can support multiple projects&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customization&lt;/strong&gt; : Applications can override settings without modifying core infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean separation&lt;/strong&gt; : Infrastructure concerns stay separate from application concerns&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-World Applications
&lt;/h2&gt;

&lt;p&gt;This architecture is particularly valuable for:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Teams New to Security&lt;/strong&gt; : The egress proxy makes security violations visible and immediately actionable. It's harder to ignore a blocked request than to overlook a security best practice document.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Regulated Industries&lt;/strong&gt; : Healthcare, finance, and government applications need defense-in-depth from day one. Starting with network segmentation in development means your security model is baked in, not bolted on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supply Chain Risk Management&lt;/strong&gt; : With increasing supply chain attacks (SolarWinds, Log4Shell), understanding your dependencies' network behavior is critical. This environment makes that behavior explicit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Production Deployments&lt;/strong&gt; : If you're running Docker Compose in production (and many successful companies do), this gives you a development environment with identical security constraints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Progressive Web Apps (PWAs)&lt;/strong&gt;: Service Workers require HTTPS to function. With this environment, you can develop and test PWA features locally without deploying to a staging server or dealing with certificate management.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API Development with Secure Cookies&lt;/strong&gt; : When building APIs that use &lt;code&gt;Secure&lt;/code&gt; and &lt;code&gt;SameSite&lt;/code&gt; cookies, HTTPS in development ensures your authentication flow works identically locally and in production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Third-Party Integrations&lt;/strong&gt; : Many OAuth providers and payment gateways require HTTPS redirect URIs, even for development. This environment satisfies those requirements without tunneling services like ngrok.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microservices Training&lt;/strong&gt; : Even if you plan to use Kubernetes eventually, understanding network segmentation at the Docker level builds intuition for NetworkPolicies and service mesh concepts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security-Conscious Startups&lt;/strong&gt; : Early-stage companies can afford to build security in from the start. This environment makes secure-by-default the path of least resistance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Clone the repository and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir -p secretsdocker compose build --no-cachedocker compose up -d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Access your app at &lt;code&gt;https://www.localhost&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt; : Your browser will show a certificate warning because this uses a self-signed certificate. This is expected and safe for local development. Accept the warning to proceed.&lt;/p&gt;

&lt;p&gt;Why HTTPS and not HTTP? Because production applications use HTTPS, and browsers behave differently under HTTPS. This environment helps you discover HTTPS-specific issues during development:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mixed content blocking&lt;/li&gt;
&lt;li&gt;Secure cookie requirements&lt;/li&gt;
&lt;li&gt;Service Worker restrictions&lt;/li&gt;
&lt;li&gt;API security contexts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Test the HTTPS setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Should return "Running !!!!" with a 200 statuscurl -k https://www.localhost/healthy# The -k flag tells curl to accept self-signed certificates
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also verify the TLS configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# View certificate detailsopenssl s_client -connect localhost:443 -servername www.localhost &amp;lt; /dev/null# You'll see Caddy's self-signed certificate information
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Test egress filtering:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose exec egress /usr/local/bin/tester.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Customization
&lt;/h2&gt;

&lt;p&gt;Add new allowed domains by creating files in &lt;code&gt;egress/domain-lists.d/&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "api.example.com" &amp;gt;&amp;gt; egress/domain-lists.d/allowed-domains-app.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The proxy automatically reloads within seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Security shouldn't start at the deployment gate. By bringing production security constraints into your development environment, you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learn production patterns while writing code&lt;/li&gt;
&lt;li&gt;Catch network issues before they're emergencies &lt;/li&gt;
&lt;li&gt;Build intuition about your application's security posture&lt;/li&gt;
&lt;li&gt;Create self-documenting network architectures&lt;/li&gt;
&lt;li&gt;Experience real browser security behavior with HTTPS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This Docker-based approach is simple enough for daily use but sophisticated enough to translate directly to production. No orchestration required unless you actually need it.&lt;/p&gt;

&lt;p&gt;Start by cloning the repository and running &lt;code&gt;docker compose up&lt;/code&gt;. The first time egress filtering blocks something unexpected, you'll understand why this matters.&lt;/p&gt;

&lt;p&gt;The full source code, including the tester script and additional examples, is available at &lt;a href="https://gitlab.com/mandraketech/java-secure-dev-env" rel="noopener noreferrer"&gt;java-secure-dev-env&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next Steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repository and explore the configurations&lt;/li&gt;
&lt;li&gt;Add your own application to the &lt;code&gt;app&lt;/code&gt; service&lt;/li&gt;
&lt;li&gt;Customize domain whitelists for your dependencies&lt;/li&gt;
&lt;li&gt;Use the patterns as a template for your team's projects&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you adapt this for other languages or find interesting edge cases, open an issue or PR. The goal is a reusable pattern for secure-by-default development across ecosystems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Reference
&lt;/h2&gt;

&lt;p&gt;| Task | Command |&lt;br&gt;
| Start environment | &lt;code&gt;docker compose up -d&lt;/code&gt; |&lt;br&gt;
| Stop environment | &lt;code&gt;docker compose down&lt;/code&gt; |&lt;br&gt;
| Access application | &lt;code&gt;https://www.localhost&lt;/code&gt; (note HTTPS) |&lt;br&gt;
| View all logs | &lt;code&gt;docker compose logs -f&lt;/code&gt; |&lt;br&gt;
| View app logs | &lt;code&gt;docker compose logs -f app&lt;/code&gt; |&lt;br&gt;
| Enter app container | &lt;code&gt;docker compose exec app bash&lt;/code&gt; |&lt;br&gt;
| Access database | &lt;code&gt;docker compose exec app psql -h database -U psqladmin -d app_db&lt;/code&gt; |&lt;br&gt;
| Test egress filtering | &lt;code&gt;docker compose exec egress /usr/local/bin/tester.sh&lt;/code&gt; |&lt;br&gt;
| Test HTTPS locally | &lt;code&gt;curl -k https://www.localhost/healthy&lt;/code&gt; |&lt;br&gt;
| Rebuild all services | &lt;code&gt;docker compose build --no-cache &amp;amp;&amp;amp; docker compose up -d&lt;/code&gt; |&lt;br&gt;
| Add allowed domain | &lt;code&gt;echo "domain.com" &amp;gt;&amp;gt; egress/domain-lists.d/allowed-domains-app.txt&lt;/code&gt; |&lt;br&gt;
| Test proxy manually | &lt;code&gt;docker compose exec app curl -x http://egress:3128 https://example.com&lt;/code&gt; |&lt;br&gt;
| View certificate details | &lt;code&gt;openssl s_client -connect localhost:443 -servername www.localhost &amp;lt; /dev/null&lt;/code&gt; |&lt;/p&gt;




&lt;h2&gt;
  
  
  Credits
&lt;/h2&gt;

&lt;p&gt;The code for this blog was written manually first, and fine tuned with rigorous usage. The initial article draft was generated using AmpCode Free (&lt;a href="https://ampcode.com" rel="noopener noreferrer"&gt;https://ampcode.com&lt;/a&gt;), and then substantially revised and enhanced with Claude (Anthropic) to improve technical depth, add comprehensive debugging sections, emphasize TLS/HTTPS production parity, and refine the strategic positioning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Back Link
&lt;/h2&gt;

&lt;p&gt;This article was originally published &lt;a href="https://blog.mandraketech.in/java-secure-devcontainer" rel="noopener noreferrer"&gt;here on the &lt;strong&gt;MandrakeTech Blog&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The Author, &lt;a href="https://www.linkedin.com/in/navneetkarnani" rel="noopener noreferrer"&gt;&lt;strong&gt;Navneet Karnani&lt;/strong&gt;&lt;/a&gt;, began coding with Java in 1997 and has been a dedicated enthusiast ever since. He strongly believes in the "Keep It Simple and Stupid" principle, incorporating this design philosophy into all the products he has developed.&lt;/p&gt;

&lt;p&gt;Navneet works as a freelancer, mentor, advisor and a fractional CTO in startups that build technology products.&lt;/p&gt;

&lt;p&gt;Driven software engineer (Java since 1997) with a hands-on passion for building impactful tech products. Possesses over 25 years of experience crafting solutions to complex business and technical challenges.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have questions or improvements? Open an issue or PR on the repository!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;]]&amp;gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>security</category>
      <category>devsecops</category>
      <category>networking</category>
    </item>
    <item>
      <title>Bring Your Own Library</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Tue, 22 Jul 2025 11:41:45 +0000</pubDate>
      <link>https://forem.com/mandraketech/bring-your-own-library-2fkd</link>
      <guid>https://forem.com/mandraketech/bring-your-own-library-2fkd</guid>
      <description>&lt;p&gt;&lt;strong&gt;Stop waiting for your college or employer to fund your future. In today's digital economy, the most successful students and early professionals in India are building their own productivity arsenalsand you should too.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just as you wouldn't attend college without buying your own textbooks or start a job without bringing your phone, investing in your personal toolkit of AI, learning platforms, and productivity software has become essential for academic and career success. The best part? With student discounts and India's growing digital infrastructure, smart investing is more accessible and impactful than ever.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hard Reality: Your Institution Won't Provide Everything You Need
&lt;/h2&gt;

&lt;p&gt;While India's higher education system serves &lt;strong&gt;4.33 crore students across 58,643 institutions&lt;/strong&gt; , most colleges provide only basic software access. Meanwhile, freshers entering the job market face average starting salaries of &lt;strong&gt;36 lakhs per annum&lt;/strong&gt; , often with limited access to premium productivity tools that could accelerate their careers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The students and professionals who stand out aren't necessarily the smartestthey're the best-equipped. They've learned what successful freelancers and contractors figured out long ago: &lt;strong&gt;owning your tools gives you ownership of your growth&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Set an Absolute Tool Stack Budget
&lt;/h2&gt;

&lt;p&gt;As with everything that involves a cost, do not forget to budget for your toolkit. You should treat this cost as your fees for learning, not as an expense. Increase the allocation as you are able to afford more, but never compromise on the toolsetjust like you wouldn't for the reading material for your coursework, or for your lab equipment.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Aim for an absolute annual budget of 20,00025,000 to build your essentials, and 40,00060,000 if you want advanced or specialized tools.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Start lean with basics and scale as you progressthis approach works whether you're a student, intern, fresher, or junior exec.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Remember: these budgets are tiny compared to your potential return in job offers, better grades, and skill growth.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Recommended Toolkits by Domain
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Technology (Programmers, QA/Testers)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Budget:&lt;/strong&gt; 20,00040,000/year&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ChatGPT Plus or Perplexity Pro:&lt;/strong&gt; 21,600/year&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Copilot:&lt;/strong&gt; Free (Student Pack)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub, JetBrains:&lt;/strong&gt; Free student IDE licenses&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notion, Trello:&lt;/strong&gt; Free (student plans); upgrade as needed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Udemy:&lt;/strong&gt; ~1,800/year (23 deep-dive tech courses)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extras:&lt;/strong&gt; Microsoft Azure for Students, Kaggle (free)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Designers (UI/UX, Graphic, Creatives)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Budget:&lt;/strong&gt; 25,00060,000/year&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Adobe Creative Cloud Student:&lt;/strong&gt; 21,600/year&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Figma Education:&lt;/strong&gt; Free&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canva Pro Student:&lt;/strong&gt; 15,120/year (optional)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notion, Behance:&lt;/strong&gt; Free&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Miro:&lt;/strong&gt; Free (education plan)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning:&lt;/strong&gt; Udemy or Domestika, ~2,000/year&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Tech Business Analyst/Product (PM/PO)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Budget:&lt;/strong&gt; 20,00035,000/year&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ChatGPT Plus or Perplexity Pro:&lt;/strong&gt; 21,600/year&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notion, Google Workspace:&lt;/strong&gt; Free/6,48019,500/year for business tools&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Miro, Whimsical:&lt;/strong&gt; Free student/education plans&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analytics:&lt;/strong&gt; Google Data Studio (free), Power BI (free tier)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning:&lt;/strong&gt; Udemy/Coursera, ~2,0004,000/year&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Non-Tech Professionals (Writers, Commerce, Social Science)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Budget:&lt;/strong&gt; 15,00030,000/year&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Microsoft 365 Personal:&lt;/strong&gt; 6,200/year, or&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Workspace Individual:&lt;/strong&gt; 19,500/year (premium AI plan free for students until Sept 2025)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ChatGPT Plus/Perplexity Pro:&lt;/strong&gt; 21,600/year&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canva Pro:&lt;/strong&gt; Free/15,120/year if needed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Courses:&lt;/strong&gt; Udemy/LinkedIn Learning/Coursera, ~2,0004,000/year&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notion, Obsidian:&lt;/strong&gt; Free&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why an Absolute Budget Makes Sense As You Grow
&lt;/h2&gt;

&lt;p&gt;As your career progresses, &lt;strong&gt;the fixed investment you make in your digital toolkit shrinks rapidly as a percentage of your income&lt;/strong&gt; but its positive effects continue to multiply. What might feel like a significant outlay as a fresher becomes a negligible cost as you hit higher salary bands, even though the advantages (faster learning, better output, greater career flexibility) accelerate your earning potential.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Early investment pays for itself:&lt;/strong&gt; Certifications, AI skills, and better quality work lead to higher salaries, side projects, and freelance gigsrecouping your spend many times over.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compounding returns:&lt;/strong&gt; The learning curve and productivity edge you gain early stay with you for years, making you more competitive at every career stage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The ROI: Immediate and Long-Term Benefits
&lt;/h2&gt;

&lt;h3&gt;
  
  
  📚 Academic Upside
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Faster research and writing:&lt;/strong&gt; AI tools cut assignment time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Higher quality output:&lt;/strong&gt; Premium design and submission tools make a difference.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skill certification:&lt;/strong&gt; Verified, global credentials fast-track opportunities.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💼 Career &amp;amp; Earning Power
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Better internships and placements:&lt;/strong&gt; Stand out in competitive fields.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quicker promotions:&lt;/strong&gt; Industry-leading tools shorten learning curves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Freelancing &amp;amp; business readiness:&lt;/strong&gt; Want to launch side projects? You're already equipped.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Steps to Build Your Own Library
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with free student offers:&lt;/strong&gt; Use your .ac.in/edu email for JetBrains, GitHub, Figma, Notion, Canva, Microsoft, Azure, and more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget for one premium AI/learning tool first:&lt;/strong&gt; ChatGPT Plus, Perplexity Pro, or Courserapurchase annual plans when possible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expand with specialized platforms:&lt;/strong&gt; Add design, business, or tech tools as you identify your needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Max out discounts:&lt;/strong&gt; Buy during festival/academic sales, look for group/family/student plans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track your gains:&lt;/strong&gt; Record time saved, achievements unlocked, or opportunities gainedit will keep you motivated and demonstrate ROI.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Mindset Shift: Why This Works
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The most successful professionals invest in themselves earlyoften before their employer does.&lt;/strong&gt; This bring your own library approach signals initiative, makes you adaptable, and future-proofs your career. As you grow, the cost fades but the benefits compound, helping you get ahead of peers who waited for permission or reimbursement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Call to Action
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Start with 20,00025,000/yearone subscription at a time.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prioritize free student plans and festival/family discounts.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Upgrade smartly; let your toolkit grow as your ambitions do.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Every rupee invested now becomes trivialand incredibly valuableas your career takes off.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your phone likely cost more than your first-year software stack. Your annual coffee bill or occasional fast food habit probably does too.&lt;strong&gt;Choose tools that move you upmarket, boost learning, and multiply your valueyour future self (and your bank account) will thank you.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The contractors and freelancers charging premium rates arent necessarily more talentedtheyre just better equipped. Its time students and freshers caught up to this fundamental truth.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Credits
&lt;/h2&gt;

&lt;p&gt;This article was generated using Perplexity Pro Research model ( &lt;a href="https://www.perplexity.ai/search/write-a-linkedin-post-that-tal-WqRFsdzTS0iA2a41iD1bCg#2" rel="noopener noreferrer"&gt;https://www.perplexity.ai/search/write-a-linkedin-post-that-tal-WqRFsdzTS0iA2a41iD1bCg#2&lt;/a&gt; )&lt;/p&gt;

&lt;h2&gt;
  
  
  Back Link
&lt;/h2&gt;

&lt;p&gt;This article was originally published &lt;a href="https://blog.mandraketech.in/bring-your-own-library" rel="noopener noreferrer"&gt;here on the MandrakeTech Blog&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The Author, &lt;a href="https://www.linkedin.com/in/navneetkarnani" rel="noopener noreferrer"&gt;&lt;strong&gt;Navneet Karnani&lt;/strong&gt;&lt;/a&gt;, began coding with Java in 1997 and has been a dedicated enthusiast ever since. He strongly believes in the "Keep It Simple and Stupid" principle, incorporating this design philosophy into all the products he has developed.&lt;/p&gt;

&lt;p&gt;Navneet works as a freelancer, mentor, advisor and a fractional CTO in startups that build technology products.&lt;/p&gt;

&lt;p&gt;Driven software engineer (Java since 1997) with a hands-on passion for building impactful tech products. Possesses over 25 years of experience crafting solutions to complex business and technical challenges.&lt;/p&gt;

&lt;p&gt;]]&amp;gt;&lt;/p&gt;

</description>
      <category>learning</category>
      <category>technology</category>
      <category>tools</category>
      <category>developer</category>
    </item>
    <item>
      <title>Docker Community Edition on macOS</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Sat, 28 Jun 2025 06:31:12 +0000</pubDate>
      <link>https://forem.com/mandraketech/docker-community-edition-on-macos-3loo</link>
      <guid>https://forem.com/mandraketech/docker-community-edition-on-macos-3loo</guid>
      <description>&lt;p&gt;If you're a developer on macOS looking to use Docker without Docker Desktop whether due to licensing, performance, personal preference or usage of &lt;strong&gt;VSCode DevContainers&lt;/strong&gt; this guide is for you. We'll walk through setting up a fully functional Docker environment using &lt;strong&gt;Colima&lt;/strong&gt; and the &lt;strong&gt;Docker CLI&lt;/strong&gt; , all without relying on Docker Desktop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use VSCode DevContainers Without Docker Desktop?
&lt;/h2&gt;

&lt;p&gt;Docker Desktop has long been the go-to solution for container development on macOS. However, recent changes to Docker's licensing model have introduced significant considerations for professional and enterprise users:&lt;/p&gt;

&lt;h3&gt;
  
  
  Docker Desktop Licensing Restrictions
&lt;/h3&gt;

&lt;p&gt;Docker Desktop is no longer free for all users. According to &lt;a href="https://docs.docker.com/subscription/desktop-license/" rel="noopener noreferrer"&gt;Docker's official license agreement&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker Desktop is &lt;strong&gt;free only for&lt;/strong&gt; :&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All other commercial use cases require a paid subscription. This means many developers working at mid-sized or large companies are no longer legally allowed to use Docker Desktop for free.&lt;/p&gt;

&lt;h3&gt;
  
  
  What About Docker Community Edition (CE)?
&lt;/h3&gt;

&lt;p&gt;Docker CE (Community Edition) refers to the open-source Docker Engine and CLI tools. These remain free and open-source under the Apache 2.0 license. However, Docker Desktop is a separate product that includes a GUI, VM management, and integrationsand it is not covered under the same open-source license.&lt;/p&gt;

&lt;p&gt;So while you can still use Docker CE freely, using Docker Desktop in a corporate environment without a license may violate Dockers terms.&lt;/p&gt;




&lt;p&gt;This guide walks you through setting up a fully functional DevContainer environment using &lt;strong&gt;Colima&lt;/strong&gt; , &lt;strong&gt;Docker CLI&lt;/strong&gt; , and &lt;strong&gt;VSCode&lt;/strong&gt; , all without Docker Desktop.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Uninstall Docker Desktop
&lt;/h2&gt;

&lt;p&gt;First, remove Docker Desktop and its associated components:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew remove --cask --force docker docker-desktop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures a clean slate for your new container runtime setup.&lt;/p&gt;

&lt;p&gt;Note: &lt;code&gt;docker&lt;/code&gt; cask was recently renamed to &lt;code&gt;docker-desktop&lt;/code&gt;. So, best to clean it all up.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Install Colima and Docker CLI Tools
&lt;/h2&gt;

&lt;p&gt;Install the necessary tools using Homebrew:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install colima docker docker-completion \ docker-compose docker-buildx docker-credential-helper
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What These Tools Do:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;colima&lt;/strong&gt; : Lightweight VM to run containers on macOS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;docker&lt;/strong&gt; : Docker CLI to interact with the Docker daemon.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;docker-compose&lt;/strong&gt; : Manage multi-container applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;docker-buildx&lt;/strong&gt; : Extended build capabilities with BuildKit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;docker-credential-helper&lt;/strong&gt; : Secure credential storage.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 3: Link Docker Socket
&lt;/h2&gt;

&lt;p&gt;Colima creates its own Docker socket. To make it accessible system-wide (e.g., for VSCode), link it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🔒 You may need &lt;code&gt;sudo&lt;/code&gt; for this command depending on your system permissions.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 4: Configure and Start Colima
&lt;/h2&gt;

&lt;p&gt;Customize the configuration of the colima virtual machine. Below is the one I used on my M1 Pro Mac:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;colima start --cpu 4 --memory 8 --disk 20 --vm-type vz --runtime docker --save-config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Breakdown of Options:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;--cpu 4&lt;/code&gt;: Allocates 4 virtual CPUs to the VM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;--memory 8&lt;/code&gt;: Allocates 8 GB of RAM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;--disk 20&lt;/code&gt;: Allocates 20 GB of disk space.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;--vm-type vz&lt;/code&gt;: Uses Apples native Virtualization.framework (&lt;code&gt;vz&lt;/code&gt;) for better performance on Apple Silicon.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;--runtime docker&lt;/code&gt;: Specifies Docker as the container runtime.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;--save-config&lt;/code&gt;: Persists this configuration for future &lt;code&gt;colima start&lt;/code&gt; commands.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 5: Test Your Setup
&lt;/h2&gt;

&lt;p&gt;Verify Docker is working:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker versiondocker run hello-world
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see Docker client and server versions, and the &lt;code&gt;hello-world&lt;/code&gt; container should run successfully.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 6: Use LazyDocker (Optional but Awesome)
&lt;/h2&gt;

&lt;p&gt;Launch LazyDocker for a terminal-based UI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install lazydockerlazydocker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;lazydocker&lt;/strong&gt; is a terminal UI for managing Docker containers and images. This tool gives you a clean interface to monitor containers, images, volumes, and logs.&lt;/p&gt;

&lt;p&gt;Its light weight, clean interface, and has most of the everyday management asks.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;With this setup, you get a fast, open-source, Docker Desktop-free development environment on macOS. Its lightweight, efficient, and gives you full control over your container runtimeperfect for developers who want to stay within Dockers licensing terms while maintaining a powerful local dev setup.&lt;/p&gt;




&lt;h2&gt;
  
  
  Back Link
&lt;/h2&gt;

&lt;p&gt;This article was originally published &lt;a href="https://blog.mandraketech.in/docker-community-edition-on-macos" rel="noopener noreferrer"&gt;here on the MandrakeTech Blog&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The Author, &lt;a href="https://www.linkedin.com/in/navneetkarnani" rel="noopener noreferrer"&gt;&lt;strong&gt;Navneet Karnani&lt;/strong&gt;&lt;/a&gt;, began coding with Java in 1997 and has been a dedicated enthusiast ever since. He strongly believes in the "Keep It Simple and Stupid" principle, incorporating this design philosophy into all the products he has developed.&lt;/p&gt;

&lt;p&gt;Navneet works as a freelancer and is available for contracts, mentoring, and advisory roles related to technology and its application in software product development.&lt;/p&gt;

&lt;p&gt;Additionally, Navneet serves as a visiting faculty member at &lt;a href="https://www.flame.edu.in" rel="noopener noreferrer"&gt;FLAME University, Pune, India&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Driven software engineer (Java since 1997) with a hands-on passion for building impactful tech products. Possesses over 25 years of experience crafting solutions to complex business and technical challenges.&lt;/p&gt;

&lt;p&gt;]]&amp;gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>dockerce</category>
      <category>macos</category>
    </item>
    <item>
      <title>Enterprise Applications vs Speed of Building: What Are We Trading Off?</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Fri, 23 May 2025 18:30:00 +0000</pubDate>
      <link>https://forem.com/mandraketech/enterprise-applications-vs-speed-of-building-what-are-we-trading-off-4eee</link>
      <guid>https://forem.com/mandraketech/enterprise-applications-vs-speed-of-building-what-are-we-trading-off-4eee</guid>
      <description>&lt;p&gt;Over the last few years, Node.js and React have become the default stack for many new applications. Theyre fast to pick up, have thriving communities, and make it easy to ship an MVP quickly especially for self-taught developers or bootcamp graduates.&lt;/p&gt;

&lt;p&gt;But this speed often comes with compromises.&lt;/p&gt;

&lt;p&gt;In many of these applications, critical elements like input validation, error handling, and layered architecture are either implemented inconsistently or overlooked entirely. Not always but often enough to observe a trend. It echoes the early PHP days: fast development, low structure.&lt;/p&gt;

&lt;p&gt;In contrast, enterprise systems commonly built with Java or .NET tend to attract developers who come through more formal training pipelines. This usually includes grounding in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Data structures and algorithms for efficiency and scalability&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Design patterns for modular, maintainable code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Architectural principles for long-term stability&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Structured exception handling and validation layers as standard practice&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These applications may take longer to build initially, but the gains show up later in maintainability, resilience, and the ability to evolve over time without breaking.&lt;/p&gt;

&lt;p&gt;In my experience working with fresh grads and interns, Ive noticed a reluctance to go deeper into the computer science stack. Many are quick to adopt labels like backend developer or full stack engineer, but often lack understanding of how systems actually work from memory management to concurrency, from data flows to architectural trade-offs. Its becoming increasingly difficult to find true product engineers people who can think in terms of long-term system design, not just code delivery. And its even harder to explain why slow is actually faster when done right.&lt;/p&gt;

&lt;p&gt;This isnt about dismissing modern stacks. Node and React are powerful, and used well, can scale just fine. But when foundational computer science concepts are skipped in the rush to just build something, we often pay for it later in performance, reliability, and developer burnout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Back Link
&lt;/h2&gt;

&lt;p&gt;This article was originally published &lt;a href="https://blog.mandraketech.in/speed-of-building-enterprise-apps" rel="noopener noreferrer"&gt;here on the MandrakeTech Blog&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;The Author, &lt;a href="https://linkedin.com/in/navneetkarnani" rel="noopener noreferrer"&gt;Navneet Karnani&lt;/a&gt;, began coding with Java in 1997 and has been a dedicated enthusiast ever since. He strongly believes in the "Keep It Simple and Stupid" principle, incorporating this design philosophy into all the products he has developed.&lt;/p&gt;

&lt;p&gt;Navneet works as a freelancer and is available for contracts, mentoring, and advisory roles related to technology and its application in software product development.&lt;/p&gt;

&lt;p&gt;Additionally, Navneet serves as a visiting faculty member at &lt;a href="https://www.flame.edu.in" rel="noopener noreferrer"&gt;FLAME University, Pune, India&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Driven software engineer (Java since 1997) with a hands-on passion for building impactful tech products. Possesses decades of experience crafting solutions to complex business and technical challenges.&lt;/p&gt;

&lt;p&gt;]]&amp;gt;&lt;/p&gt;

</description>
      <category>typesafe</category>
      <category>programmingblogs</category>
    </item>
    <item>
      <title>VSCode DevContainer for Python Programmers</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Fri, 24 Jan 2025 18:30:47 +0000</pubDate>
      <link>https://forem.com/mandraketech/vscode-devcontainer-for-python-programmers-hdn</link>
      <guid>https://forem.com/mandraketech/vscode-devcontainer-for-python-programmers-hdn</guid>
      <description>&lt;p&gt;In today's article, we will explore how to set up a VSCode devcontainer for Python programmers. We will cover the basics of what is a devcontainer and why it's useful, how to create one, and some tips on how to use it effectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a DevContainer?
&lt;/h2&gt;

&lt;p&gt;A devcontainer is a lightweight, reproducible, container that provides a consistent development environment for your projects. It allows you to develop, run, and debug your code in an isolated environment, which can help you focus on writing code rather than setting up your development environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use a DevContainer?
&lt;/h2&gt;

&lt;p&gt;There are several reasons why using a devcontainer is beneficial for Python programmers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Consistency&lt;/strong&gt; : A DevContainer ensures that everyone on your team has the same development environment, which can make it easier to collaborate and work together.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Isolation&lt;/strong&gt; : A devcontainer provides an isolated environment for your code, which can help prevent conflicts with other dependencies or tools you may be using.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reproducibility&lt;/strong&gt; : A devcontainer makes it easy to reproduce your development environment on any machine, which can be useful if you need to work remotely or share your project with others.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficiency&lt;/strong&gt; : By setting up a devcontainer once and then simply opening it whenever you want to work on your Python project, you can save time and effort by avoiding the hassle of setting up your development environment every time.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This article delves into getting a VS Code DevContainer Development environment based setup for early Python programmers. The environment runs on Debian, and hence is a good place to start for all School / College students too.&lt;/p&gt;

&lt;p&gt;As part of my investigations for my college teaching environments, I was in a situation where I needed to teach Python. And, as some of my readers know, I am compulsively obsessed with not installing any compiler, or programming environment, on my local machine. It has to run in a throwaway-able environment.&lt;/p&gt;

&lt;p&gt;So, I looked at the default DevContainer setup that Microsoft ships as part of their images. The environment created a 2GB image on my machine. That was really not something I like working with. So, here are the things you to be more efficient, and nimble.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;This article assumes you have the following already installed and configured:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.docker.com/desktop/" rel="noopener noreferrer"&gt;Docker Desktop&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt; , and extension &lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers" rel="noopener noreferrer"&gt;Dev Containers&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;Create an empty project folder in a location of your choice on the machine. And then:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mkdir .devcontainer&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will create a &lt;code&gt;.devcontainer&lt;/code&gt; folder inside that. The below files will go inside this folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  The &lt;code&gt;Dockerfile&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;I used the following &lt;code&gt;Dockerfile&lt;/code&gt; for the environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM debian:stable-slimRUN apt-get update \ &amp;amp;&amp;amp; apt-get install -y git python3 python3-pip \ &amp;amp;&amp;amp; apt-get cleanWORKDIR /rootCMD ["sleep infinity"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gets us in a good place. It has support for the tools mentioned in the install line, and generates an image the size of approximately 820MB. A far cry from the 2GB+ from the Microsoft Container repository. Plus, I have control over the linux version, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  The DevContainer
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Dockerfile&lt;/code&gt; is never enough. It has to be supplemented with an appropriate &lt;code&gt;devcontainer.json&lt;/code&gt; to be effective. So, here is the my version of that file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ "name": "python-dev", "build": { "dockerfile": "Dockerfile" }, "customizations": { "vscode": { "settings": { "remote.downloadExtensionsLocally": true, "telemetry.enableTelemetry": false, "extensions.ignoreRecommendations": false, "workbench.remoteIndicator.showExtensionRecommendations": false }, "extensions": ["mhutchie.git-graph", "ms-python.python", "VisualStudioExptTeam.vscodeintellicode", "samuelcolvin.jinjahtml", "donjayamanne.python-environment-manager", "ecmel.vscode-html-css", "twixes.pypi-assistant", "redhat.vscode-yaml"] } }}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There you go. Now you are ready to &lt;code&gt;Ctrl+P&lt;/code&gt; or &lt;code&gt;Cmd+P&lt;/code&gt; and &lt;code&gt;Reopen in Container&lt;/code&gt; .&lt;/p&gt;

&lt;p&gt;Have fun coding in Python !!&lt;/p&gt;

&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;The Author, &lt;a href="https://www.linkedin.com/in/navneetkarnani" rel="noopener noreferrer"&gt;Navneet Karnani&lt;/a&gt;, began coding with Java in 1997 and has been a dedicated enthusiast ever since. He strongly believes in the "Keep It Simple and Stupid" principle, incorporating this design philosophy into all the products he has developed.&lt;/p&gt;

&lt;p&gt;Navneet works as a freelancer and is available for contracts, mentoring, and advisory roles related to technology and its application in software product development.&lt;/p&gt;

&lt;p&gt;Additionally, Navneet serves as a visiting faculty member at FLAME University.&lt;/p&gt;

&lt;p&gt;Driven software engineer (Java since 1997) with a hands-on passion for building impactful tech products. Possesses over 25 years of experience crafting solutions to complex business and technical challenges.&lt;/p&gt;

&lt;p&gt;]]&amp;gt;&lt;/p&gt;

</description>
      <category>devcontainers</category>
      <category>python</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Java, SpringBoot and MySQL in devcontainer</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Fri, 17 Jan 2025 07:58:53 +0000</pubDate>
      <link>https://forem.com/mandraketech/java-springboot-and-mysql-in-devcontainer-3d94</link>
      <guid>https://forem.com/mandraketech/java-springboot-and-mysql-in-devcontainer-3d94</guid>
      <description>&lt;p&gt;In this tutorial, we'll walk through the steps to create a simple Java Spring console application that connects to a MySQL database running in a Docker container, creates a "test" table, and lists all the tables. We'll use a &lt;code&gt;devcontainer.json&lt;/code&gt; file to set up the development environment and Docker Compose to define the services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Set Up the Environment
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create &lt;code&gt;devcontainer.json&lt;/code&gt; file
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ "name": "Java Dev Environment", "dockerComposeFile": "docker-compose.yml", "service": "java", "workspaceFolder": "/workspace", "extensions": ["vscjava.vscode-java-pack", "pivotal.vscode-spring-boot"]}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create &lt;code&gt;docker-compose.yml&lt;/code&gt; file
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;services: java: image: mcr.microsoft.com/vscode/devcontainers/java:0-11 volumes: - .:/workspace command: sleep infinity mysql: image: mysql:8.0 environment: MYSQL_ROOT_PASSWORD: rootpassword MYSQL_DATABASE: testdb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Develop the Java Application
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create a new Spring Boot project
&lt;/h3&gt;

&lt;p&gt;Use Spring Initializr to generate a new Spring Boot project with the following dependencies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Spring Web&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MySQL Driver&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Configure the application properties
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;src/main/resources/application.properties&lt;/code&gt;, add the following configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;spring.datasource.url=jdbc:mysql://mysql:3306/testdbspring.datasource.username=rootspring.datasource.password=rootpassword
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create a &lt;code&gt;Main&lt;/code&gt; class
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.demo;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boot.CommandLineRunner;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import javax.sql.DataSource;import java.sql.Connection;import java.sql.ResultSet;import java.sql.Statement;@SpringBootApplicationpublic class DemoApplication implements CommandLineRunner { @Autowired private DataSource dataSource; public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } @Override public void run(String... args) throws Exception { try (Connection conn = dataSource.getConnection(); Statement stmt = conn.createStatement()) { // Create a test table stmt.executeUpdate("CREATE TABLE IF NOT EXISTS test (id INT AUTO_INCREMENT, name VARCHAR(255), PRIMARY KEY (id))"); // List all tables ResultSet rs = stmt.executeQuery("SHOW TABLES"); while (rs.next()) { System.out.println(rs.getString(1)); } } }}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Run the Application
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Open the Codespace
&lt;/h3&gt;

&lt;p&gt;Open the project in your Codespace. The &lt;code&gt;devcontainer.json&lt;/code&gt; will set up the development environment and start the containers automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run the Spring Boot application
&lt;/h3&gt;

&lt;p&gt;In the terminal, navigate to the project directory and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./mvnw spring-boot:run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Verify the Connection and Execution
&lt;/h2&gt;

&lt;p&gt;Check the terminal output to verify that the connection to the MySQL database was successful and that the "test" table was created and listed.&lt;/p&gt;




&lt;p&gt;Built using Microsoft Copilot, with the following prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Can you create a tutorial for me for the following:Create a simple Java Spring console application that connects to a MySQL database, running in a Docker container, create a "test" table, and list all the tables.Set up the environment:Use a devcontainer.json file to use a docker-compose.yml file to define the Java dev environment and MySQL.Develop the Java application:Create a Java Spring Boot application that establishes a connection to the MySQL database using JDBC.Run the application:Build and run the Java application within the Codespace. Verify the successful connection to the database and the execution of queries.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;The Author, &lt;a href="https://www.linkedin.com/in/navneetkarnani" rel="noopener noreferrer"&gt;Navneet Karnani&lt;/a&gt;, began coding with Java in 1997 and has been a dedicated enthusiast ever since. He strongly believes in the "Keep It Simple and Stupid" principle, incorporating this design philosophy into all the products he has developed.&lt;/p&gt;

&lt;p&gt;Navneet works as a freelancer and is available for contracts, mentoring, and advisory roles related to technology and its application in software product development.&lt;/p&gt;

&lt;p&gt;Additionally, Navneet serves as a visiting faculty member at FLAME University.&lt;/p&gt;

&lt;p&gt;Driven software engineer (Java since 1997) with a hands-on passion for building impactful tech products. Possesses over 25 years of experience crafting solutions to complex business and technical challenges.&lt;/p&gt;

&lt;p&gt;]]&amp;gt;&lt;/p&gt;

</description>
      <category>vscodetips</category>
      <category>devcontainer</category>
      <category>springboot</category>
      <category>mysql</category>
    </item>
    <item>
      <title>Managing Multiple GitHub Accounts: A Comprehensive Guide</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Mon, 23 Sep 2024 08:05:38 +0000</pubDate>
      <link>https://forem.com/mandraketech/managing-multiple-github-accounts-a-comprehensive-guide-55f8</link>
      <guid>https://forem.com/mandraketech/managing-multiple-github-accounts-a-comprehensive-guide-55f8</guid>
      <description>&lt;p&gt;A lot of organisations these days use Github for hosting their repositories. With BYOD as a normal practice, everyone wants to be able to differentiate their Git access for work from the one for personal use. Here is a way in which SSH based git access can be streamlined, so that you can easily switch between work and personal work, and never make errors&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
### The intention&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In todays digital age, many developers find themselves juggling multiple GitHub accountsone for personal projects and another for work. Managing these accounts efficiently can be a bit tricky, but with the right setup, you can seamlessly switch between them. This guide will walk you through the process of configuring your Git and SSH settings to handle multiple GitHub accounts on the same machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Separate Accounts?
&lt;/h3&gt;

&lt;p&gt;Using separate email addresses for personal and work repositories on GitHub is a good practice for several reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Privacy and Security&lt;/strong&gt; : Keeping your work and personal emails separate helps protect your privacy and maintain security. Your work email might have different security policies and access controls compared to your personal email.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Organization&lt;/strong&gt; : It helps in organizing your repositories and contributions. You can easily distinguish between work-related and personal projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Professionalism&lt;/strong&gt; : Using your work email for professional repositories ensures that your contributions are recognized by your employer and colleagues.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Setting Up SSH Keys
&lt;/h3&gt;

&lt;p&gt;First, generate separate SSH keys for your personal and work accounts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    # Personal account ssh-keygen -t rsa -b 4096 -C "your_personal_email@example.com" # Save the key as ~/.ssh/id_rsa_personal # Work account ssh-keygen -t rsa -b 4096 -C "your_work_email@example.com" # Save the key as ~/.ssh/id_rsa_work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the generated SSH keys to the SSH agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    # Start the SSH agent eval "$(ssh-agent -s)" # Add personal key ssh-add ~/.ssh/id_rsa_personal # Add work key ssh-add ~/.ssh/id_rsa_work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Configuring SSH Config File
&lt;/h3&gt;

&lt;p&gt;Edit your &lt;code&gt;~/.ssh/config&lt;/code&gt; file to include both keys and block direct access to &lt;a href="http://github.com" rel="noopener noreferrer"&gt;&lt;code&gt;github.com&lt;/code&gt;&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    # Block direct access to github.com, to never make an error Host github.com HostName github.com User git IdentityFile /dev/null # Personal account Host github-personal HostName github.com User git IdentityFile ~/.ssh/id_rsa_personal # Work account Host github-work HostName github.com User git IdentityFile ~/.ssh/id_rsa_work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Cloning Repositories
&lt;/h3&gt;

&lt;p&gt;When cloning repositories, use the appropriate host alias:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    # Personal repository git clone git@github-personal:username/repo.git # Work repository git clone git@github-work:username/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Configuring Git for Each Repository
&lt;/h3&gt;

&lt;p&gt;Ensure you set the correct email for each repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    # For personal repositories cd path/to/personal/repo git config user.name "Your Name" git config user.email "your_personal_email@example.com" # For work repositories cd path/to/work/repo git config user.name "Your Name" git config user.email "your_work_email@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Using Gits &lt;code&gt;includeIf&lt;/code&gt; Directive
&lt;/h3&gt;

&lt;p&gt;You can set up Git to use different &lt;a href="http://user.name" rel="noopener noreferrer"&gt;&lt;code&gt;user.name&lt;/code&gt;&lt;/a&gt; and &lt;a href="http://user.email" rel="noopener noreferrer"&gt;&lt;code&gt;user.email&lt;/code&gt;&lt;/a&gt; configurations based on the repository path using Gits &lt;code&gt;includeIf&lt;/code&gt; directive. Heres how:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open your global Git configuration file&lt;/strong&gt; :&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Add the&lt;/strong&gt; &lt;code&gt;includeIf&lt;/code&gt; directive:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create the additional configuration files&lt;/strong&gt; :&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Restricting Access to Private Repositories
&lt;/h3&gt;

&lt;p&gt;To restrict access to private repositories and ensure that only public repositories are accessible, you might need to use network-level controls or firewall settings. This approach can be complex and might require additional tools or configurations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;By following these steps, you can effectively manage both your personal and work repositories on GitHub without confusion. Whether you choose to use different SSH keys, configure Git settings based on repository paths, or employ network-level restrictions, these practices will help you maintain a clear separation between your personal and professional projects.&lt;/p&gt;

&lt;p&gt;If you have any questions or need further assistance, feel free to reach out!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Originally published at &lt;a href="https://blog.mandraketech.in/managing-multiple-git-accounts" rel="noopener noreferrer"&gt;https://blog.mandraketech.in/managing-multiple-git-accounts&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;
  
  
  About the Author
&lt;/h3&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Navneet Karnani is a Full Stack Ployglot veteran, and explores technology to build great products, always striving to extract more productivity from the tools he uses. You can follow him at:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.linkedin.com/in/navneetkarnani" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/navneetkarnani&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.mandraketech.in" rel="noopener noreferrer"&gt;https://www.mandraketech.in&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;]]&amp;gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>devops</category>
      <category>programmingtips</category>
    </item>
    <item>
      <title>Installing Docker for Windows Home for Standard User</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Mon, 15 Jul 2024 12:24:56 +0000</pubDate>
      <link>https://forem.com/mandraketech/installing-docker-for-windows-home-for-standard-user-34jl</link>
      <guid>https://forem.com/mandraketech/installing-docker-for-windows-home-for-standard-user-34jl</guid>
      <description>&lt;p&gt;As a learning requirement during my internship recently, I was required to learn the use of Docker. Now there will be people like me, who are new to the concept of what Docker is, this is how it is explained on the Amazon Web Services page for Docker.&lt;/p&gt;

&lt;p&gt;Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardised units called containers with everything the software needs to run including libraries, system tools, code, and runtime. Using Docker, you can quickly deploy and scale applications into any environment and know your code will run.&lt;/p&gt;

&lt;p&gt;While setting up docker Windows Home, I ran into a few issues in getting docker to run. After a lot of debugging, I realised that the issue I was facing was because I was using a standard user as opposed to the system administrator.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Should You Use a Standard User on Windows Home?
&lt;/h3&gt;

&lt;p&gt;A standard account has no power, while an admin account can do anything. So why would you want to use a standard account? That's a good question, and the answer is that it's because it lacks power. We are human. We are going to make a mistake sooner or later. In an admin account, we could end up ruining something crucial very easily, or maybe even make the entire computer unbootable.&lt;/p&gt;

&lt;p&gt;However, a standard account won't have such issues due to the lack of power. Additionally, this account will also stop malicious programs like malware from damaging your Windows system.&lt;/p&gt;

&lt;p&gt;So if you don't already use a separate standard user account on your computer, this is your sign to start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Docker Desktop
&lt;/h2&gt;

&lt;p&gt;The first step in setting up Docker is to &lt;a href="https://www.docker.com/" rel="noopener noreferrer"&gt;install Docker Desktop&lt;/a&gt;. After downloading and running the correct version of the Docker installer, follow the steps to completely install it. You can follow &lt;a href="https://docs.docker.com/desktop/install/windows-install/" rel="noopener noreferrer"&gt;this guide&lt;/a&gt; to install it, or use &lt;a href="https://docs.docker.com/desktop/wsl/" rel="noopener noreferrer"&gt;this one&lt;/a&gt; to install it backend on WSL 2. Once you are done with the basic steps, is where the debugging comes in.&lt;/p&gt;

&lt;p&gt;To check whether docker has been properly installed, type 'cmd' in your Windows search bar and run your Command Line as administrator. Enter the following command.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;If your output looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Client:
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:29:54 2024
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.31.1 (153621)
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:29:22 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then docker is working fine. If not, then it can have one of many fixes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Changing User Type
&lt;/h3&gt;

&lt;p&gt;If you are a standard user, as recommended earlier, you will need to give yourself the required permissions to be able to use Docker.&lt;/p&gt;

&lt;p&gt;To check if you have the required permissions, press [WINDOWS + R] and enter 'netplwiz'. This will take you to the Advanced User Accounts Control Panel. Here you will be able to see your user type. If you don't aren't part of the 'docker-users' group, here is the fix for it.&lt;/p&gt;

&lt;p&gt;Open up the command line as an administrator, and enter the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;localgroup&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;docker-users&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"user-id"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/ADD&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your "user-id" is your local windows username, and can be found by looking at the folder name under C:\Users\ .&lt;/p&gt;

&lt;p&gt;Now when you go back to Advanced User Accounts Control Panel, docker-users should be added as a group for your user account.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enabling Docker Daemon
&lt;/h3&gt;

&lt;p&gt;If while using docker, you get an error message like the one shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Client:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   d8d3314
 Built:        Tue Nov  1 03:05:34 2016
 OS/Arch:      windows/amd64
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/version: open //./pipe/docker_engine: The system cannot find the file
specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the case of this error, open up the Docker Desktop app and go to the settings page. Check the box which says 'Expose daemon on tcp://localhost:2375 without TLS', and then apply the changes before trying again.&lt;/p&gt;

&lt;p&gt;If you have followed all of these steps, then you should now be able to use Docker properly.&lt;/p&gt;

&lt;p&gt;This article was originally published at: &lt;a href="https://blog.mandraketech.in/installing-docker-for-windows-home-for-standard-user" rel="noopener noreferrer"&gt;https://blog.mandraketech.in/installing-docker-for-windows-home-for-standard-user&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>dockerinstallation</category>
    </item>
    <item>
      <title>A Privacy Practice Reminder</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Sat, 22 Jun 2024 06:30:25 +0000</pubDate>
      <link>https://forem.com/mandraketech/a-privacy-practice-reminder-36p7</link>
      <guid>https://forem.com/mandraketech/a-privacy-practice-reminder-36p7</guid>
      <description>&lt;p&gt;As a matter of privacy, please change your user ids to not have your birth dates, other dates of relevance, in there. You will be surprised how many times a username / password is leaked. Preferably, use a password manager. &lt;/p&gt;

&lt;p&gt;Apple, Google, Microsoft and Firefox ship very capable tools for password management. Some people do not like to use those, and for them there are third party offerings, with both free and paid licenses. I have evaluated Bitwarden and LastPass in the past, and finally settled on my OS provided one, because it allowed me to remember only one credentials for access. Yes, it puts me at risk if I lose that, or if the vendor decides to lock me out. But, I am safer that way then forgetting the password to the password store itself.&lt;/p&gt;

&lt;p&gt;If you already have accounts what have the above combination, and the site allows you to change it, please act on priority. &lt;/p&gt;

&lt;p&gt;If the site does not support renaming, and the accounts are "not important" from a "losing data" perspective, please delete them and create new ones with random names / passwords generated by the password manager.&lt;/p&gt;

&lt;p&gt;For email, you should create a new one without those numbers, and have the emails "forward" to the new account. And, in the future, use the new email address. &lt;/p&gt;

&lt;p&gt;No matter your age, you still have a long life of sharing contact details with people, so it will be worth upgrading now.&lt;/p&gt;

</description>
      <category>privacy</category>
      <category>bestpractices</category>
    </item>
    <item>
      <title>End of the 16gb RAM era ?</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Fri, 21 Jun 2024 08:42:41 +0000</pubDate>
      <link>https://forem.com/mandraketech/end-of-the-16gb-ram-era--i04</link>
      <guid>https://forem.com/mandraketech/end-of-the-16gb-ram-era--i04</guid>
      <description>&lt;p&gt;Until recently, I always bought computers with 16gb RAM. As a developer, this was important, but also necessary for optimal performance. Specially with tools like Docker, and IntelliJ needing the resources they do. I don't mention Chrome, because that is a choice people make. And I make different decisions. 🙂 &lt;/p&gt;

&lt;p&gt;I am seeing that with the advent of Large Language Models, and integration of GenAI tools in the core operating systems, the need for better models, and more memory will show up very soon. Also, I am seeing that the 70b (10+ gb) models are way better than the 3b (1.5+ gb) ones. I know the small ones are only going to get better from here, but remember that the large ones will benefit from that technology too. &lt;/p&gt;

&lt;p&gt;Plus, supporting large context windows will be a requirement, and the "hosted" versions will get increasingly cheaper (like Gmail made "unlimited" email storage mainstream). But, we have to be careful, and remember that one fine day, Google did come back and say that unlimited only means 17gb.&lt;/p&gt;

&lt;p&gt;Also, as developers, we tend to work better when we are disconnected ( Airplane mode anyone ? ). So, having a model that works when on the road / plane is always a good idea. And for this reason alone, I prefer running the models on device.&lt;/p&gt;

&lt;p&gt;But running these models does not come cheap. With 16gb RAM, I can run the 3b models today, for code completion, blog writing, etc. But, as time passes, I want more out of them. I also have situations where there are multiple models loaded. One for Chat, another for Tab completion. And we will now also get MacOS and Windows run a LLM for OS features. So, memory will start vanishing faster than we will know.&lt;/p&gt;

&lt;p&gt;So, my feeling is that my next machine will be a 32GB one. And Apple makes it even more attractive by changing the nomenclature of memory available, from 16gb to 18gb, and from 32gb to 36gb. More the merrier, right ?!&lt;/p&gt;

</description>
      <category>developer</category>
      <category>devlife</category>
    </item>
    <item>
      <title>VSCode DevContainer setup for C/C++ programmers</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Fri, 14 Jun 2024 10:35:20 +0000</pubDate>
      <link>https://forem.com/mandraketech/vscode-devcontainer-setup-for-cc-programmers-2h7g</link>
      <guid>https://forem.com/mandraketech/vscode-devcontainer-setup-for-cc-programmers-2h7g</guid>
      <description>&lt;p&gt;This article delves into getting a VS Code DevContainer Development environment based setup for early C/C++ programmer. The environment runs on Debian, and hence is a good place to start for all School / College students too.&lt;/p&gt;

&lt;p&gt;As part of my investigations for my college teaching environments, I was in a situation where I needed to teach C++. And, as some of my readers know, I am compulsively obsesses with not installing any compiler, or programming environment, on my local machine. It has to run in a throwaway-able environment.&lt;/p&gt;

&lt;p&gt;So, I looked at the default DevContainer setup that Microsoft ships as part of their images. The environment created a 2GB image on my machine. That was really not something I like working with. So, here are the things you to be more efficient, and nimble.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;Create an empty project folder in a location of your choice on the machine. And then:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mkdir .devcontainer&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will create a &lt;code&gt;.devcontainer&lt;/code&gt; folder inside that. The below files will go inside this folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  The &lt;code&gt;Dockerfile&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;I used the following &lt;code&gt;Dockerfile&lt;/code&gt; for the environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; debian:stable-slim&lt;/span&gt;

&lt;span class="k"&gt;RUN &lt;/span&gt;apt-get update &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; git g++ gcc make gdb &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; apt-get clean

&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /root&lt;/span&gt;

&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["sleep infinity"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gets us in a good place. It has support for the tools mentioned in the install line, and generates an image the size of approximately 820MB. A far cry from the 2GB+ from the Microsoft Container repository. Plus, I have control over the linux version, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  The DevContainer
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;Dockerfile&lt;/code&gt; is never enough. It has to be supplemented with an appropriate &lt;code&gt;devcontainer.json&lt;/code&gt; to be effective. So, here is the my version of that file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cpp-dev-container"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"dockerfile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Dockerfile"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"customizations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"vscode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"settings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"remote.downloadExtensionsLocally"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"telemetry.enableTelemetry"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"extensions.ignoreRecommendations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"workbench.remoteIndicator.showExtensionRecommendations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"extensions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="s2"&gt;"ms-vscode.cpptools"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="s2"&gt;"kunalg.library-documentation-cpp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="s2"&gt;"danielpinto8zz6.c-cpp-compile-run"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There you go. Now you are ready to &lt;code&gt;Ctrl+P&lt;/code&gt; or &lt;code&gt;Cmd+P&lt;/code&gt; and &lt;code&gt;Reopen in Container&lt;/code&gt; .&lt;/p&gt;

&lt;p&gt;When you open the container, there is an extension called &lt;code&gt;CompileAndRun&lt;/code&gt; that will allow you to run the current C/C++ file using &lt;strong&gt;the default settings&lt;/strong&gt;. You can also set the breakpoints.&lt;/p&gt;

&lt;p&gt;Have fun C++ing&lt;/p&gt;

&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;The Author, &lt;a href="https://www.linkedin.com/in/navneetkarnani"&gt;Navneet Karnani&lt;/a&gt;, began coding with Java in 1997 and has been a dedicated enthusiast ever since. He strongly believes in the "Keep It Simple and Stupid" principle, incorporating this design philosophy into all the products he has developed.&lt;/p&gt;

&lt;p&gt;Navneet works as a freelancer and is available for contracts, mentoring, and advisory roles related to technology and its application in software product development.&lt;/p&gt;

&lt;p&gt;Additionally, Navneet serves as a visiting faculty member at FLAME University.&lt;/p&gt;

&lt;p&gt;Driven software engineer (Java since 1997) with a hands-on passion for building impactful tech products. Possesses over 25 years of experience crafting solutions to complex business and technical challenges.&lt;/p&gt;

</description>
      <category>c</category>
      <category>devcontainer</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Web application, Need they be complex ?</title>
      <dc:creator>Navneet Karnani</dc:creator>
      <pubDate>Tue, 30 Apr 2024 09:36:21 +0000</pubDate>
      <link>https://forem.com/mandraketech/web-application-need-they-be-complex--2k38</link>
      <guid>https://forem.com/mandraketech/web-application-need-they-be-complex--2k38</guid>
      <description>&lt;p&gt;Over the past few weeks, I have started learning &lt;strong&gt;#Python&lt;/strong&gt; , because all the students I teach, and mentor, come with that as the background. Until recently, I was helping them learn "different" programming languages, but with the noise around AI, LLMs and the works, they seem to be more inclined to stay with that.&lt;/p&gt;

&lt;p&gt;So, I created a "proof of concept" application for a friend. And I am amazed at the fact that my understanding of "low complexity application is the norm" actually is true. The problem domain is fairly complex, and the security requirements very stringent. But I have been able to put together a foundation that will allow her to get help from just about anyone in the world to keep her application updated.&lt;/p&gt;

&lt;p&gt;In my opinion, it cannot get more &lt;strong&gt;#lowcode&lt;/strong&gt; than this. Anything else, is just lock-in. And will come back to bite people very quickly.&lt;/p&gt;

&lt;p&gt;By the way, I had a similar experience when I built the same app, using Java, H2DB and the internal HttpServer that ships with Java. The only external thing I needed to use was the Thymeleaf templating engine, and I think it was an overkill. Should have just relied on Java Server Pages.&lt;/p&gt;

&lt;p&gt;Yes, you heard that. No Kubernetes. No microservices. No microfrontends. Just plain simple HTML (server rendered). Scales for most users, and keeps the costs low.&lt;/p&gt;

&lt;p&gt;Let's talk about the solution I built. The implementation has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Every user has their own db, so no chance of crossing over of data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No one can query for "all the data" at any point, until the tools for that are built&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The app will build more security for the db, that will run password rotation regularly, making the data even more secure&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Built using Python, and Flask - the programming language, and library, with a long history, and every student learns this in college&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Uses SQLite as the database, the smallest, fastest and most popular database in the world. Probably sitting on your computer right now if you use Firefox. If you use an Android or iOS device, then you are using SQLite. SQLite also does not need a server, so we do not keep "unnecessary" data in memory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We follow a "keep it light" philosophy, so our server does not use more memory, or CPU than is necessary. We use a "just in time" fetching of data, and release it immediately.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In production, the app will use a secure-by-default strategy with the Caddy Server sitting before our actual python server, that serves certificates to your browser from the most popular, and trusted, certificate provider LetsEncrypt. The certificates are rotated every 60 days, so there is reduced chance of spoofing continuing for longer than is needed.&lt;/p&gt;

&lt;p&gt;In the hosted dev deployment, we use an approach called "ssh tunneling" that allows us to host our application without it being exposed to the internet at all. The server we run on, is initiating a onnection to the internet, and then traffic is routed from there. We use Cloudflare, the most trusted provider for internet security for our security.&lt;/p&gt;

&lt;p&gt;In local dev, we use Docker Compose, and Caddy to mimic our production setup as far as we can. Caddy allows us to use https, even for localhost urls, and hence build the html pages with the right security warnings addressed.&lt;/p&gt;

&lt;p&gt;I use Gitlab CI for building the production image, and Docker Compose for the deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;About the Author&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Author, &lt;a href="https://www.linkedin.com/in/navneetkarnani"&gt;&lt;strong&gt;Navneet Karnani&lt;/strong&gt;&lt;/a&gt;, began coding with Java in 1997 and has been a dedicated enthusiast ever since. He strongly believes in the "Keep It Simple and Stupid" principle, incorporating this design philosophy into all the products he has developed.&lt;/p&gt;

&lt;p&gt;Navneet works as a freelancer and is available for contracts, mentoring, and advisory roles related to technology and its application in software product development.&lt;/p&gt;

&lt;p&gt;Additionally, Navneet serves as a visiting faculty member at FLAME University, teaching the Distributed Systems (CS402) course to the BSc(CS) Hons. batch graduating in 2024.&lt;/p&gt;

&lt;p&gt;Driven software engineer (Java since 1997) with a hands-on passion for building impactful tech products. Possesses over 25 years of experience crafting solutions to complex business and technical challenges.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
