docker
bringing up containers in azure
Create a resource group
sql
az group create --name myGroup --location eastus
Create the container
css
az container create --resource-group myGroup --name myName --image tensorflow/tensorflow --dns-name-label myDnsName --ports 8888
Show status
css
az container show --resource-group myGroup --name myName --query "{FQDN:ipAddress.fqdn,ProvisioningState:provisioningState}" --out table add container to another container's network
For example, adding the container some-postgis to the same network as the container postgres_adminer_1.
Find the NetworkID of the network:
perl
docker inspect postgres_adminer_1 | grep NetworkID
Add the container to the network:
sql
docker network connect f51952f2eb6ea17fbf1917b3609b99f2a70cce8b4e1e1c35177bcb4388ff1124 some-postgis docker disk usage
Find large directories
bash
du -ah / | sort -h -r | head -n 20
Find containers using a given volume
lua
docker ps -a --filter volume=<volume>
Remove container and its associated volume
bash
docker rm -v container
See total volume, image, container space
bash
docker system df
See space used per volume
bash
docker system df -v
Remove dangling volumes from disk
undefineddocker volume prune
remove containers by image
For the image verdaccio/verdaccio:
powershell
docker rm $(docker ps -q -a --filter ancestor=verdaccio/verdaccio) run container indefinitely
Set the command to tail -f /dev/null
Example:
bash
docker run -d node tail -f /dev/null set container timezone
Set the TZ environment variable inside linux containers to set the timezone, for example docker run -e TZ={timezone} or, for example inside your docker-compose;
makefile
environment:
TZ: "Australia/Sydney" updating running containers
perl
# set to always restart
docker update --restart=always <container>
# rename
docker rename <container> <new name> building prometheus inside a container
Don’t install go, instead build it inside the go container;
ruby
docker run --rm -v %CD%:/go/src/github.com/prometheus/prometheus -w /go/src/github.com/prometheus/prometheus golang:1.10 make build
Run it inside that docker container too!
ruby
docker run --rm -v %CD%:/go/src/github.com/prometheus/prometheus -w /go/src/github.com/prometheus/prometheus -p 9090:9090 golang:1.10 ./prometheus
Note: I executed the following to have it use a test config;
bashcopy ./config/testdata/conf.good.yml ./prometheus.yml
wsl uses all the ram
posts
- Running Containers for Free on fly.io
- Continuous Deployment to Kubernetes - Part 2
- Continuous Deployment to Kubernetes - Part 1
- Minimal Elasticsearch Resources in Kubernetes
- Static Code Analysis for .NET with SonarQube
- This Social Image was Generated
- Load testing ASP.NET Core SignalR
- Docker containers aren't just for long running tasks
- Noob tips for Traefik
- ASP.NET 5 on the Amazon (Linux) Cloud
- Optimising WordPress and MySQL docker images for Amazon EC2 micro instances
- Gnashing of Teeth on the Bleeding Edge
- .NET Development on Linux
links
a tool that you can use to create and run Linux containers as lightweight virtual machines on your Mac. It’s written in Swift, and optimized for Apple silicon.
After installing and starting the service via container system start the cli gives you a similar experience to docker. Unfortunately in my case after resolving dated sources and switching dependencies to arm64 I discovered my Dockerfile candidate still had an x86 binary so I’ll need to find another candidate to test any performance improvements.
The next version of docker (v4.40) will add native llm capability to the docker cli. Docker Model Runner is not yet publicly released, but adds commands like docker model run that will run LLM models outside of containers. Initial reports look promising and may be nice replacement for running llama.cpp, koboldcpp or ollama locally.