# Example Dockerfile to demonstrate .dockerignore's impact FROM alpine:latest WORKDIR /app # Copy all necessary application files from the build context. # The .dockerignore file (located in the same directory as the Dockerfile) # will exclude specified files and directories from being sent to the Docker daemon. # # Example .dockerignore content: # .git # node_modules/ # tmp/ # *.log # Dockerfile # .dockerignore # .DS_Store # .vscode/ # target/ COPY . . # Run a command to show what's inside the copied directory in the image # You should see that items ignored by .dockerignore are not present. RUN ls -la CMD ["echo", "Application running with optimized context."]