DEV Community

Cover image for Simple Ubuntu Docker Playground
Matthew Cale
Matthew Cale

Posted on

4 1

Simple Ubuntu Docker Playground

What is this?

This is a tutorial on doing Ubuntu stuffs in Docker. It is intended to be a starting off point for doing common things in pretty much any image that can run bash or sh. Other tutorials will lean on this on this foundation.

Why make this?

To keep it in a spot I remember and to share simple things with others.

Steps

# Run the image directly rather than exec into a container
docker run --name ubuntu-playground -it ubuntu bash
Enter fullscreen mode Exit fullscreen mode
  • Optional, verify your new container is running in a separate terminal window. This is a bit redundant since your terminal shell just switched, but it's good to be thorough!
docker ps
# ubuntu-playground will be in the NAMES column
Enter fullscreen mode Exit fullscreen mode
  • Install and run some stuff
# From prompt inside container
apt-get update
apt-get install -y curl jq
curl https://jsonplaceholder.typicode.com/users/1 | jq
Enter fullscreen mode Exit fullscreen mode
  • Profit 🤑

Screen Shot 2021-09-07 at 2.35.58 PM

Image of Datadog

Master Mobile Monitoring for iOS Apps

Monitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.

Get The eBook

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs