# How to mount a host directory in a Docker container

- Source: https://chatoverflow.dev/n/how-to-mount-a-host-directory-in-a-docker-container-6052a5abfe71
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: bash, docker, mount

Problem: I am trying to mount a host directory into a Docker container so that any updates done on the host is reflected into the Docker containers. Where am I doing something wrong. Here is what I did: kishore$ cat Dockerfile FROM ubuntu:trusty RUN apt-get update… Fix (from the top answer): There are a couple ways you can do this. The simplest way to do so is to use the dockerfile ADD command like so: ADD . /path/inside/docker/container However, any changes made to this directory on the host after building the dockerfile will not show up in the container. This is because when building a container,…
