Skip to content

Instantly share code, notes, and snippets.

@saggie
Last active November 12, 2022 01:12
Show Gist options
  • Save saggie/c7f99b7627a0e813fda97f52d7f525f8 to your computer and use it in GitHub Desktop.
Save saggie/c7f99b7627a0e813fda97f52d7f525f8 to your computer and use it in GitHub Desktop.
Run and Login to an Ubuntu Container
# For Linux/macOS
docker run -it --rm --volume $PWD:/opt/pwd ubuntu:latest /bin/bash
# For Windows (PowerShell)
docker run -it --rm --volume ${PWD}:/opt/pwd ubuntu:latest /bin/bash
# To be anable to cURL
apt-get update && apt-get install -y curl
# To be anable to ssh
apt-get update && apt-get install -y openssh-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment