Skip to content

Instantly share code, notes, and snippets.

View staciax's full-sized avatar

STACiA staciax

View GitHub Profile
@staciax
staciax / dockerignore-test.sh
Created February 19, 2024 15:02 — forked from sgdan/dockerignore-test.sh
Test the ".dockerignore" file to ensure the build context doesn't contain unwanted files
#!/bin/sh
# Based on BMitch's answer from:
# https://stackoverflow.com/questions/38946683/how-to-test-dockerignore-file
# Note: will create and delete temporary file "Dockerfile.build-context"
# 1. Copy to project folder where image is being built
# 2. Run script
# 3. You should see list of files in build context