Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Docker: Ubuntu htop

  • RUN

Previously we created a Docker image manually after we have installed htop and created a file manually in a Docker container. Let's do the same now using Dockerfile.

FROM ubuntu:23.04

RUN apt-get update
RUN apt-get install -y htop
RUN echo "Hello World" > welcome.txt
docker build -t mydocker .
docker run --rm -it mydocker