Docker

Making Matplotlib in Docker draws in Windows through WSL

The initial title of this post is "A Simple Docker Example", which is going to show how to plot a simple Python program into a Docker image and run it. But it turns out that I’ve chosen a not so simple one as an example. Few days ago, I have annotated several hundred of bib images with their corresponding bib numbers for my Bib-Racer-Recognition project. I want to double check whether I have tagged the bib numbers correctly for the images, so I just created a simple program to show the original images and the corresponding bib numbers.

Docker Notes

Some notes while learning Docker with the Docker Getting Started Tutorial. Basics Concept: container is an isolated environment for build, run, deploy, and share applications. Container interacts with its own private file system, and runs in different namespace, which is provided by a Docker image. Relevant commands Images: Build image where the Dockerfile is in current directory: docker build -t <image[:tag]> . Pull image from registry: docker image pull <image> List images: docker image ls Containers: Start a container and for example with a web application based on an built image: docker run -d -p <host_port>:<container_port> --name <container_name> <image> Show available containers: docker ps -a Stop a container: docker stop <container_name> or docker stop <container_id Start a stopped container: docker start <container_name> or docker start <container_id> Start a container and run a specific command: docker container run -w <working_dir> <image> <command> Send a command to an UP container: docker exec <container_name> <command> Remove a container: docker rm <container_name>, or docker rm -f <container_name> to stop and remove a container in one command.