Extending local Dockerfile

Dockerfiles don’t extend Dockerfiles but images, the FROM line is not an “include” statement. So, if you want to “extend” another Dockerfile, you need to build the original Dockerfile as an image, and extend that image. For example; Dockerfile1: FROM alpine RUN echo “foo” > /bar Dockerfile2: FROM myimage RUN echo “bar” > /baz Build …

Read more

Set DNS options during docker build

Dockerfile-based solution You can also fix the DNS lookup problem on a per RUN-command level: RUN echo “nameserver XX.XX.1.1” > /etc/resolv.conf && \ echo “search companydomain” >> /etc/resolv.conf && \ command_depending_on_dns_resolution Keep in mind: This will only change the DNS resolution behaviour for this one RUN command, as changes to the /etc/resolv.conf are not persistent …

Read more

Extend service in docker-compose 3

This is very easy with YAML: version: “3” services: myservice: &myservice build: context: ./myservice command: ./something environment: &myservice_environment VAR1: “val1” VAR2: “val2” VAR3: “val3” myotherservice: <<: *myservice environment: <<: *myservice_environment VAR1: “val1-bis” See the doc regarding extension-fields

I can’t install Docker because containerd.io has no installation candidate

It’s not the cleanest way to do it I guess, but I had the same problem as you and I changed: $ sudo add-apt-repository \ “deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable” to $ sudo add-apt-repository \ “deb [arch=amd64] https://download.docker.com/linux/ubuntu \ bionic \ stable” because $(lsb_release -cs) returns “eoan” (the name of the latest …

Read more