Dockerfile says directory copied, but it's not in the container?

Viewed 15

My dir structure is ./ ../ Dockerfile data/ requirements/ web/

I want to copy the contents of ./web/ and ./data/ (which contains a folder called scanned_images which has 3 subfolders; 1 of which contains files) to /code.

My Dockerfile (shortened)

# syntax=docker/dockerfile:1
FROM python:3.10.2

RUN apt update

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

WORKDIR /code
COPY ./web/ .
COPY ./data/ .
RUN pwd
RUN ls . -la

COPY requirements/development.txt requirements.txt
COPY requirements/base.txt base.txt
RUN pip install --no-cache-dir -r requirements.txt

The output when I build

#10 [ 3/12] WORKDIR /code
#10 sha256:e62a26851c861700522a4096e6d534dc98acf8609e657e5735605429fe928db2
#10 CACHED

#12 [ 4/12] COPY ./web/ .
#12 sha256:b1db2b9a4b8e01df386b3650ba9f28b7299a110898447cfe462c21b39cce38a4
#12 DONE 0.1s

#13 [ 5/12] COPY ./data/ .
#13 sha256:439a8fb2b7c88f561c68f6afac4adb25c26070d083e2f8f9acce261eb7faed6e
#13 DONE 0.1s

#14 [ 6/12] RUN pwd
#14 sha256:1d19dc009c4e502fb5ffff1ef78e08ec7565fb4d06cb4b3ddab752c7cd418952
#14 0.258 /code
#14 DONE 0.3s

#15 [ 7/12] RUN ls . -la
#15 sha256:2984e7778ef0c9d6356a1b887c8bd45fd60511edf365b77e2db16c382447501f
#15 0.406 total 36
#15 0.406 drwxr-xr-x 1 root root 4096 Jul  8 14:35 .
#15 0.406 drwxr-xr-x 1 root root 4096 Jul  8 14:35 ..
#15 0.406 drwxr-xr-x 3 root root 4096 Jul  6 14:36 arthur_sid
#15 0.406 drwxr-xr-x 2 root root 4096 Jul  5 15:00 fonts
#15 0.406 drwxr-xr-x 5 root root 4096 Jul  5 15:00 main_app
#15 0.406 -rwxr-xr-x 1 root root  666 May 13 11:09 manage.py
#15 0.406 drwxr-xr-x 3 root root 4096 Jul  5 15:00 media
#15 0.406 drwxr-xr-x 5 root root 4096 Jul  8 14:30 scanned_images
#15 0.406 drwxr-xr-x 4 root root 4096 Jul  5 15:00 static
#15 DONE 0.4s

But when I spin up the containers and bash into web, scanned_images isn't there:

root@2256c7e6a69b:/code# ls
arthur_sid  fonts  main_app  manage.py  media  static

Where has "scanned_images" gone? I mean it's copying everything from ./web/, and im using the exact same command just after it.

(╯°□°)╯︵ ┻━┻

0 Answers
Related