I try to build a docker container that include externals files

  bind9, dns, docker, docker-container, dockerfile

I try to create a docker container with bind9 on it and I want to add my db.personal-domain.com file but when I run docker build and then docker run -tdp 53:53 -v config:/etc/bind <image id> the container doesn’t have my db.personal-domain.com file. How to fix that ? Thanks !

tree structure



FROM ubuntu:20.04

RUN apt-get update
RUN apt-get install -y bind9
RUN apt-get install -y bind9utils

WORKDIR /etc/bind
VOLUME ["/etc/bind"]

COPY config/db.personal-domain.com /etc/bind/db.personal-domain.com

EXPOSE 53/tcp

CMD ["/usr/sbin/named", "-g", "-c", "/etc/bind/named.conf", "-u", "bind"]

Source: Docker Questions