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

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more