PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, October 18, 2022

[FIXED] How to forbid auto deleting a docker container after exit

 October 18, 2022     docker, windows-subsystem-for-linux     No comments   

Issue

I was using wsl2 Ubuntu 20.04 with docker. I created a container in wsl, but when I exit from the container, the docker automatically deleted the container. Yet I didn't have this problem when I created a container from windows command line.

How to prevent docker from auto deleting the container I created in wsl command line?


Solution

It appears you may have created the container with docker run [...] --rm [...]. This will cause the container to be removed when the container exits. To prevent auto-removal, be sure not to include --rm when creating your container



Answered By - richyen
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing