docker-compose doesn't see contents of a particular directory

Viewed 242

I've got a docker-compose.yml file that mounts the current directory as a volume to /app in a container. The .yml looks something like this:

version: "3"
services:
  app:
    build:
      context: .
      dockerfile: docker/Dockerfile-commandbox
    volumes:
      - .:/app
    ports:
      - "8080:8080"
    environment:
      - TZ=${TIMEZONE-America/Los_Angeles}

Pretty basic.

Now, when I ssh into that container and navigate to the /app directory, it can see the ./wwwroot folder, but its contents are empty, despite not being empty on my host machine. Performing a directory listing on the wwwroot folder in the container displays no results; whereas the folder has lots of content.

wwwroot exists... but has no files in it

What would be causing the container to not be able to see the contents of the wwwroot folder?

The Dockerfile-commandbox file is pretty straightforward as well.

FROM ortussolutions/commandbox:4.8.0
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
    net-tools \
    tzdata \
    vim \
 && rm -rf /var/lib/apt/lists/*
COPY scheduled/scheduled-tasks.cfm /app/
WORKDIR /app
RUN box server start cfengine=lucee@5.3.7.47 port=8080 serverHomeDirectory=/root/serverHome host=0.0.0.0 openbrowser=false saveSettings=false heapSize=4096 minHeapSize=4096 \
    && box config set server.defaults.app.cfengine=lucee@5.3.7.47 server.defaults.web.AJP.enable=true \
    && curl -sS http://localhost:8080/scheduled-tasks.cfm \
    && box server stop

UPDATE To be clear, there are other files in the directory structure and each one is visible, with its contents, from the container. Directory structure

1 Answers

This must have been a glitch in Docker. On 12/18 release 3.0.2 was available. Installing the update, and bringing up the containers made the issue go away. To confirm I rolled back to 3.0.1, and witnessed the issue again. I also did a full purge of my containers by running docker system prune -a and rebuilding everything from scratch.

As of Docker Desktop Community edition for Mac 3.0.2, this is no longer an issue.

Related