How to Install and Use Docker on Windows 11

a white and blue square object on a white background

This comprehensive guide walks you through installing Docker Desktop on Windows 11, setting up WSL 2, and managing your projects effectively.

Prerequisites

  • Windows 11 64-bit (Home or Pro edition)
  • Administrator access to your computer
  • Virtualization enabled in BIOS (we’ll verify this)

Step 1: Verify Virtualization is Enabled

Before installing Docker, check if virtualization is enabled on your system.

Quick Method – Task Manager

  1. Right-click on the taskbar and select Task Manager (or press Ctrl + Shift + Esc)
  2. Click on the Performance tab
  3. Click on CPU in the left panel
  4. Look at the bottom right for “Virtualization: Enabled”

If it shows “Disabled”, you’ll need to enable it in BIOS:

  1. Restart your computer
  2. Enter BIOS (usually by pressing F2, F10, Del, or Esc during startup)
  3. Find virtualization settings under Advanced, CPU Configuration, or Security:
    • Intel processors: Look for “Intel VT-x” or “Intel Virtualization Technology”
    • AMD processors: Look for “AMD-V” or “SVM Mode”
  4. Enable it and save changes
  5. Restart your computer

Step 2: Install WSL 2 and Ubuntu

Docker Desktop on Windows requires WSL 2 (Windows Subsystem for Linux).

Install WSL and Ubuntu

  1. Open PowerShell as Administrator:
    • Right-click Start menu ? Terminal (Admin) or Windows PowerShell (Admin)
  2. Run the installation command: wsl --install This installs WSL 2 and Ubuntu by default.
  3. Restart your computer when prompted
  4. After restart, Ubuntu will automatically open:
    • Create a username (can be different from your Windows username)
    • Create a password (characters won’t appear as you type – this is normal)
    • Remember this password – you’ll need it for admin tasks

Verify WSL Installation

Open PowerShell and run:

wsl --list --verbose

You should see Ubuntu listed with VERSION 2.

Step 3: Install Docker Desktop

Download and Install

  1. Go to https://www.docker.com/products/docker-desktop
  2. Download Docker Desktop for Windows
  3. Run the installer
  4. When prompted, choose “Use WSL 2 instead of Hyper-V” (recommended)
  5. Complete the installation
  6. Restart your computer

Start Docker Desktop

  1. Launch Docker Desktop from the Start menu
  2. Wait for it to start (you’ll see a whale icon in the system tray)
  3. Accept the terms and conditions if prompted

Verify Docker Installation

Open PowerShell or Command Prompt and run:

docker --version
docker run hello-world

If you see a “Hello from Docker!” message, Docker is working correctly!

Step 4: Configure Docker with WSL

Enable WSL Integration

  1. Open Docker Desktop
  2. Click the gear icon (Settings)
  3. Go to Resources ? WSL Integration
  4. Enable “Enable integration with my default WSL distro”
  5. Toggle on your Ubuntu distribution
  6. Click Apply & Restart

Now Docker will work from both Windows and Ubuntu terminals!

Step 5: Choose Where to Store Your Projects

You have two options for project location:

Option A: Keep Projects in Windows (Recommended for Cursor AI Users)

Location: C:\Users\YourUsername\Projects\your-project

Pros:

  • Easy access with Windows tools and IDEs like Cursor AI
  • Familiar file structure
  • Simple drag-and-drop

Access from Docker:

cd C:\Users\YourUsername\Projects\your-project
docker run --rm -v ${PWD}:/app your-image

Option B: Store Projects in WSL Ubuntu

Location: /home/yourusername/projects/your-project (inside Ubuntu)

Pros:

  • Faster Docker performance
  • Native Linux development environment

Access from Windows:

  • In File Explorer, type: \\wsl$\Ubuntu\home\yourusername\projects
  • Bookmark this location for easy access
  • Cursor AI can open projects from this path

Access from Ubuntu Terminal:

cd ~/projects/your-project
docker run --rm -v $(pwd):/app your-image

Working with Git in WSL

If your project is stored in WSL, follow these best practices:

Initial Setup

When you first access a Git repository in WSL from Windows PowerShell, you might see:

fatal: detected dubious ownership in repository

Solution: Always run Git commands from the Ubuntu terminal, not PowerShell.

Set Up SSH for Git

If you’re using SSH for Git (like GitLab or GitHub):

  1. Open Ubuntu terminal
  2. Generate SSH key: ssh-keygen -t ed25519 -C "your_email@example.com" Press Enter to accept defaults
  3. Copy your public key: cat ~/.ssh/id_ed25519.pub
  4. Add the key to your Git hosting service:
    • GitHub: Settings ? SSH and GPG keys ? New SSH key
    • GitLab: User Settings ? SSH Keys
    • Paste your public key and save
  5. Test the connection: # For GitHub ssh -T git@github.com # For GitLab ssh -T git@gitlab.com

Use SSH Agent (If Your Key Has a Passphrase)

To avoid entering your passphrase repeatedly:

# Start SSH agent
eval "$(ssh-agent -s)"

# Add your key
ssh-add ~/.ssh/id_ed25519

Enter your passphrase once – it will be cached for the session.

Make SSH Agent Start Automatically

Edit your bash profile:

nano ~/.bashrc

Add these lines at the end:

# Start SSH agent and add key
if [ -z "$SSH_AUTH_SOCK" ] ; then
  eval "$(ssh-agent -s)" > /dev/null
  ssh-add ~/.ssh/id_rsa 2>/dev/null
fi

Save (Ctrl+X, Y, Enter), then reload:

source ~/.bashrc

Fixing Git Line Ending Issues

If Git shows all files as modified after cloning, it’s likely a line ending issue (Windows uses CRLF, Linux uses LF).

Fix in Ubuntu Terminal

cd ~/your-project

# Configure Git to use Linux line endings
git config core.autocrlf input
git config core.filemode false

# Reset all files with correct line endings
git rm --cached -r .
git reset --hard HEAD

# Verify
git status

Prevent Future Issues

Create a .gitattributes file in your project root:

cat > .gitattributes << 'EOF'
* text=auto eol=lf
*.sh text eol=lf
EOF

git add .gitattributes
git commit -m "Add gitattributes to enforce LF line endings"

Recommended Workflow

For the best experience when using Cursor AI with WSL:

  1. Store projects in Windows (C:\Users\YourUsername\Projects\)
  2. Edit code in Cursor AI (Windows application)
  3. Run Docker commands from either PowerShell or Ubuntu terminal
  4. Run Git commands from Ubuntu terminal
  5. Keep both Cursor AI and Ubuntu terminal open side-by-side

This workflow gives you the best of both worlds: easy editing with Windows tools and proper Linux environment for Docker and Git.

Common Docker Commands

Running Containers

# Run a container
docker run image-name

# Run with port mapping
docker run -p 4000:4000 image-name

# Run with volume mounting
docker run -v ${PWD}:/app image-name

# Run in detached mode
docker run -d image-name

Managing Containers

# List running containers
docker ps

# List all containers
docker ps -a

# Stop a container
docker stop container-id

# Remove a container
docker rm container-id

Managing Images

# List images
docker images

# Remove an image
docker rmi image-name

# Build an image
docker build -t my-image .

Docker Compose

# Start services
docker-compose up

# Start in detached mode
docker-compose up -d

# Stop services
docker-compose down

# View logs
docker-compose logs

Troubleshooting

Docker Desktop Won’t Start

  • Ensure virtualization is enabled in BIOS
  • Check that WSL 2 is properly installed: wsl --list --verbose
  • Restart Docker Desktop
  • Restart your computer

“Cannot connect to Docker daemon”

  • Make sure Docker Desktop is running (check system tray)
  • In Docker Desktop settings, verify WSL integration is enabled

Slow Performance

  • Store projects in WSL filesystem instead of Windows for better performance
  • Allocate more resources to Docker in Settings ? Resources

Git Shows All Files Modified

  • Follow the line ending fix in the “Fixing Git Line Ending Issues” section above

Conclusion

You now have a fully functional Docker development environment on Windows 11! This setup allows you to:

  • Run Docker containers efficiently using WSL 2
  • Use your favorite Windows tools like Cursor AI for development
  • Leverage Linux commands and tools through Ubuntu
  • Manage Git repositories properly with SSH authentication

Happy coding!

Climate Change Debates: Reality, Hoaxes, and Conspiracy Theories

traffic light sign underwater

The debate surrounding climate change encompasses scientific facts, conspiracy theories, and claims of hoaxes. This article explores the scientific basis of climate change, examines its portrayal as a hoax, and addresses the impact of conspiracy theories. Understanding these facets is crucial for forming an informed opinion on one of today’s most pressing issues.

The Scientific Foundation of Climate Change

The scientific foundation of climate change is built upon a vast and robust body of evidence that clearly documents the profound impact of greenhouse gases on Earth’s climate system. Central to this understanding is the role of greenhouse gases—primarily carbon dioxide (CO2), methane (CH4), nitrous oxide (N2O), and fluorinated gases—in trapping heat within the Earth’s atmosphere. This natural phenomenon, known as the greenhouse effect, is essential for maintaining temperatures conducive to life. However, human activities since the Industrial Revolution have significantly amplified this effect, leading to unprecedented global warming.

Since the late 18th century, marked by the advent of the Industrial Revolution, atmospheric concentrations of CO2 have risen sharply—from about 280 parts per million (ppm) in pre-industrial times to over 420 ppm today. This increase is primarily driven by the combustion of fossil fuels such as coal, oil, and natural gas, which releases vast quantities of CO2 into the atmosphere. Deforestation further compounds this issue, as trees, which serve as natural carbon sinks, are removed at alarming rates. Industrial processes, cement production, and agriculture also contribute substantial emissions of greenhouse gases, especially methane and nitrous oxide, which are far more potent in trapping heat per molecule than CO2 over short timescales.

The direct link between these human-induced emissions and rising global temperatures has been extensively documented through multiple lines of scientific evidence. Temperature records from global surface stations, satellite data, and ocean measurements consistently show a clear warming trend. According to the Intergovernmental Panel on Climate Change (IPCC), the Earth’s surface temperature has increased by approximately 1.1°C since the late 19th century, with much of this warming occurring over the last fifty years. Notably, the five warmest years on record have all occurred since 2015, emphasizing the acceleration of climate change.

In addition to temperature records, scientists analyze proxies such as ice cores, sediment layers, and tree rings to reconstruct past climate conditions. These proxies reveal that current levels of atmospheric CO2 are unprecedented in at least the past 800,000 years, directly correlating with shifts in global temperatures. Ice core data from Antarctica show that periods of high greenhouse gas concentrations align with warmer interglacial periods, but the current spike in CO2 levels far exceeds natural fluctuations observed before industrialization.

Climate models, which are sophisticated simulations of Earth’s climate system, further cement this understanding. These models incorporate the known physical laws governing atmospheric, oceanic, and land surface processes, allowing scientists to test various scenarios. When these models account for natural influences—solar variability, volcanic activity—they still fail to reproduce the recent warming without including human-produced greenhouse gases. Conversely, models projecting only natural factors show little to no warming, thereby reinforcing the critical role of anthropogenic emissions in recent climate change.

The scientific consensus is reinforced by comprehensive assessments from major scientific organizations worldwide. The Intergovernmental Panel on Climate Change (IPCC) in its Sixth Assessment Report states with high confidence that human influence is the dominant cause of observed global warming since the mid-20th century. Similarly, the National Academies of Sciences and Engineering in the United States, the Royal Society in the United Kingdom, and their counterparts across the globe have explicitly endorsed the conclusion that human activities are solely responsible for recent climate trends.

Fundamentally, the scientific basis of climate change hinges on understanding how increased greenhouse gas concentrations alter the Earth’s energy balance. This is measured by the radiative forcing concept, which quantifies the change in energy fluxes caused by factors such as greenhouse gases, aerosols, and land-use changes. Elevated levels of greenhouse gases have an overall positive radiative forcing—meaning they trap more heat—leading to a warming of the climate system. Far from speculative, this physical process has been verified through satellite observations, laboratory experiments, and real-world climate data.

Understanding the scientific evidence is crucial, especially in the face of misinformation, hoaxes, and conspiracy theories emphasizing doubt or denial. While natural variability and other factors always influence climate, the overwhelming body of scientific research confirms that human activity is the primary driver of recent changes. Dismissing this evidence not only hampers efforts to mitigate climate impacts but also endangers future generations. Recognizing the solid scientific foundation behind climate change empowers policymakers, communities, and individuals to make informed decisions aimed at reducing emissions and adapting to the changes already underway.

Conclusions

In conclusion, robust scientific consensus confirms human-induced climate change as a real, pressing threat. While misinformation and conspiracy theories persist, evidence and experts agree on the need for urgent action. Staying informed and critical of false narratives is essential to support effective climate solutions and global well-being.

My AI experiments

Of late, I have been experimenting a lot with AI tools. These experiments cement my views on the benefits of using these development assistants to enhance productivity.

Full transparency: I was an average developer at best. I was a late entrant into computers. The first couple of years of my career were spent working for the government in far-flung posts, locations that lacked regular electricity or running water. A return to ‘civilian life’ turned me towards computers, which have been a part of my life for the last three decades. Now, to the main point.

A couple of weeks back, I created three game apps using AI tools and posted them on my website. To explain further, I have not written a line of code in these apps. That might explain their success, but that’s another story.
Let me clarify that I can understand code and, to some extent, what is written in error logs and can also test apps.

Let me now explain how ‘I’ built those apps. I started by defining what I wanted in a few sentences. Next, I copied and pasted this draft into Grok and asked it to write a professional requirements document. I handed this document to Figma Make.

Within seconds, Figma made a prototype with CSS, TSX, and TS files. The end result was a working sample app I could test immediately. I gave a few more instructions and minor tweaks, which it followed like an intelligent developer, and my basic app was ready.

By the way, Figma does all this for free. Once I was satisfied with the end result, I downloaded the files and put them in a folder on my laptop. I opened this folder in Cursor AI and asked it to transform it into a WordPress plugin zip. The plugins are now installed and running on my blog.

My point is this: if a man in his late fifties with a basic understanding of code can do this, imagine what smart, energetic, and intelligent YOU can do.
If you have ideas or see an opportunity to turn your imagination into workable software, now is the time. No need to spend years learning and memorizing all the nuances of a programming language. With basics, you can achieve a lot. Think of yourself as a business person who hires a smart developer to write some code.

The catch is, These apps are not exactly ‘no code’ or even ‘low code’. It is a bit more than low code and involves a lot of manual testing on your part. Also, do not trust the AI tool blindly, as these systems are still in their infancy and learning to walk. You have to hold its hand and gently guide it. Remember the movie Superman when the toddler crash-lands at Kent’s farm. It could lift a car with its hands, but it was still a baby. That is AI for you as of today.

A day may come when it won’t fully obey your commands and tells you to do your coding yourself, but till that day comes, enjoy the show. Have some fun building the app of your dreams and get it done fast.

Embracing Active Living for a Long and Healthy Life in Old Age

people exercising

As we age, maintaining an active lifestyle becomes crucial for health and longevity. This article explores how regular exercise can counteract the effects of sedentary living, enhance quality of life, and foster a long, active, and healthy life well into old age.

The Importance of Exercise in Old Age

Exercise plays a pivotal role in promoting health and longevity among older adults, serving as a vital countermeasure against the decline often associated with aging. As age progresses, physiological changes such as reduced cardiac efficiency, muscle mass loss, decreased bone density, and impaired coordination become more pronounced. Engaging in regular physical activity can significantly mitigate these effects, fostering a state of well-being that underpins a long, vibrant, and independent life.

One of the foremost benefits of exercise in old age is its profound impact on cardiovascular health. Scientific studies consistently demonstrate that regular aerobic activity, such as walking, swimming, or cycling, can improve heart function, lower blood pressure, and reduce levels of harmful low-density lipoprotein (LDL) cholesterol. For instance, a meta-analysis published in the Journal of the American College of Cardiology indicated that older adults who engaged in moderate-intensity aerobic exercise experienced a 20-25% reduction in cardiovascular disease risk. These improvements not only prolong life but also enhance the quality of that life by reducing the incidence of heart attacks, strokes, and related complications.

Beyond cardiovascular benefits, exercise is instrumental in increasing muscle strength and preserving skeletal integrity. Sarcopenia, the age-related loss of muscle mass, contributes to frailty, decreased mobility, and a higher risk of falls and fractures. Resistance training, such as strength exercises with weights or resistance bands, can reverse or slow this decline. Research indicates that even adults over 70 can gain significant muscle strength and mass through targeted training programs, leading to improved functional capacity, greater independence, and a diminished risk of disability. Moreover, enhanced muscular support helps stabilize joints, reducing pain and increasing confidence in daily activities.

Equally critical is the role of exercise in maintaining balance and coordination. As aging affects the proprioceptive system and neuromuscular control, falls become a leading cause of injury among seniors. Balance exercises and activities like tai chi and yoga have been shown to improve postural stability and reaction time. A landmark study in the British Medical Journal found that participation in balance-enhancing exercise reduced fall risk by up to 40% in older adults. Not only does this prevent acute injuries, but it also preserves autonomy and the ability to carry out routine tasks without assistance.

In addition to physical benefits, exercise exerts a profound influence on mental well-being. Older adults are vulnerable to depression, anxiety, and cognitive decline, conditions that significantly impact quality of life. Regular physical activity has been linked with the release of endorphins, serotonin, and other neurochemicals that elevate mood and reduce stress. Neuroimaging studies reveal that exercise promotes neurogenesis, particularly in the hippocampus, an area integral to memory and learning. For example, research in the Archives of Internal Medicine shows that even moderate activity — such as brisk walking for 150 minutes weekly — can improve cognitive function and decrease the risk of developing dementia and Alzheimer’s disease by up to 30%.

Another vital aspect is delaying age-related decline. Exercise stimulates cellular repair mechanisms, enhances mitochondrial function, and supports hormonal balance, all of which slow down the biological aging process. Regular activity influences telomere length, a biomarker of cellular aging, and is associated with increased lifespan. According to the World Health Organization, physically active seniors tend to live 5 to 10 years longer, with higher health-adjusted life expectancy, than their sedentary counterparts.

In practical terms, the integration of exercise into daily routines for older adults must be tailored and sustainable. The American Heart Association and other health organizations recommend at least 150 minutes of moderate-intensity aerobic activity per week, complemented by muscle-strengthening exercises on two or more days. Importantly, the safety and enjoyment of activity are paramount; activities should be accessible, correspond to individual fitness levels, and incorporate varied movements to prevent overuse injuries. Additionally, social interaction in group classes or walking groups can augment motivation and adherence, creating a positive feedback loop that encourages ongoing engagement.

While initial hesitation or fear of injury can be barriers, evidence indicates that with appropriate guidance and gradual progression, older adults can safely reap the myriad benefits of exercise. In fact, physical activity is rarely associated with adverse events when properly prescribed, and the health dividends far outweigh the minimal risks involved. Healthcare providers are increasingly emphasizing exercise as a core component of chronic disease management and preventive health in old age, recognizing it as an affordable, effective, and empowering tool.

In sum, embracing regular exercise in old age is a cornerstone of healthy aging. It fortifies the cardiovascular system, maintains muscular and skeletal integrity, sharpens balance and coordination, uplifts mental health, and prolongs independent living. In a world where sedentary lifestyles continue to threaten health outcomes, active living emerges not only as a lifestyle choice but as a vital strategy for achieving a long, fulfilling, and healthy life well into one’s later years.

Conclusions

Adopting an active lifestyle is vital for aging gracefully. Regular exercise reduces health risks, boosts vitality, and supports independence. Emphasizing movement and activity at any age helps ensure a fulfilling, long, and healthy life, making it a worthwhile goal for everyone.