I have Dockerfile:
ENV DATARATOR_HOME /usr/local/share/datarator
RUN mkdir -p $DATARATOR_HOME
COPY . $DATARATOR_HOME
and .dockerignorefile:
/Gemfile.lock
/coverage
/spec
*.bundle
*.so
*.o
*.a
mkmf.log
*.swp
/.*
/tmp
/log
However, when you show files in the built-in container, I see also those that should be ignored:
/usr/local/share/datarator
total 128
drwxr-xr-x 10 root root 4.0K Mar 29 21:01 .
drwxr-xr-x 4 root root 4.0K Mar 29 21:00 ..
drwxr-xr-x 2 root root 4.0K Mar 29 21:01 .bundle
-rw-rw-r
-rw-rw-r
drwxrwxr-x 8 root root 4.0K Mar 29 20:37 .git
-rw-rw-r
-rw-rw-r
-rw-rw-r
-rw-rw-r
-rw-rw-r
-rw-r
-rw-rw-r
-rw-rw-r
-rw-rw-r
-rw-rw-r
-rw-rw-r
drwxrwxr-x 2 root root 4.0K Mar 29 20:37 bin
drwxrwxr-x 2 root root 4.0K Mar 29 20:37 config
-rw-rw-r
-rw-r
-rw-rw-r
drwxrwxr-x 4 root root 4.0K Mar 29 20:37 lib
drwxrwxr-x 2 root root 4.0K Mar 29 20:37 log
drwxrwxr-x 3 root root 4.0K Mar 29 20:37 spec
drwxrwxr-x 2 root root 4.0K Mar 29 20:37 tmp
How can I avoid ignoring everything mentioned in the file .dockerignore?
source
share