Below you will find pages that utilize the taxonomy term “Docker”
October 30, 2020
Docker With Custom DNS Server
By configuring your Docker containers to talk to a custom DNS server, you gain more control over how your container look up other services – database, other microservices, etc.,
It turns out Docker networking isn’t completely straight forward. On Linux you can:
- Run a DNS server locally, either dnsmasq or devdns
- Run your container with
--dns 172.17.0.1
, the magic IP where your host machine is located - Configure dnsmasq from step 1 via
/etc/hosts
Sadly, none of it was easy. The entire thing probably took me three hours.
July 12, 2020
Running Private Docker Registry
I still find it hard to believe how easy it is to run your own infrastructure in the cloud.
Running a Docker registry is as simple as adding a few lines of code to your Terraform configuration.
resource "aws_ecr_repository" "foo" {
name = "bar"
image_tag_mutability = "MUTABLE"
image_scanning_configuration {
scan_on_push = true
}
}
When deployed, this create an registry where you can manage multiple Docker repositories. You can upload a Docker image to be used in your private ECS cluster: