Montag, 21. November 2016

Docker cheat sheet

Start docker image and map a port from the docker image to a port on localhost
docker run -p 127.0.0.1:8806:3306 8538c205bee2
Starts image id 8538c205bee2 and maps internal port 3306 of that image to localhost port 8806.

Open a bash in a running docker image
docker exec -it 8538c205bee2 /bin/bash
Stop all running docker images
docker stop $(docker ps -a -q)
Remove/delete all running docker images
docker rm $(docker ps -a -q)

Mittwoch, 16. November 2016

How to browser a remote docker repository

to browse a remote docker repository for available versions of a docker image you could use the docker API like this

curl https://mydockerrepo.de/v2/[IMAGE-NAME]/tags/list