-- Leo's gemini proxy

-- Connecting to republic.circumlunar.space:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Run bash inside any version of Linux using Docker


Docker is useful for some things, and not as useful as you think for others.


Here's something massively useful: get a throwaway bash prompt inside any version of any Linux distribution in one command:


docker run -i -t --mount "type=bind,src=$HOME/Desktop,dst=/Desktop" ubuntu:18.10 bash

This command downloads a recent Ubuntu 18.10 image, mounts my desktop as /Desktop in the container, and gives me a bash prompt. From here I can install any packages I want and then use them.


For example, today I used it to decrypt a file that was encrypted with a cipher my main OS did not have a package for.


When I exit bash, the container stops and I can find it with docker ps -a then remove it with docker rm. To really clean up I can find the downloaded images with docker image ls and remove them with docker image rm.


Originally posted at 2019-01-08 10:25:35+00:00. Automatically generated from the original post : apologies for the errors introduced.


original post

-- Response ended

-- Page fetched on Sun May 19 07:55:51 2024