Skip to content

Commit

Permalink
change to allowlist pattern in dockerignore (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Dec 29, 2021
1 parent ba7880f commit bdd717b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
22 changes: 5 additions & 17 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# unnecessary LightGBM files
LightGBM/.appveyor.yml
LightGBM/build-cran-package.sh
LightGBM/build_r.R
LightGBM/.editorconfig
LightGBM/.github/*
LightGBM/helpers/*
LightGBM/.nuget/*
LightGBM/pmml/*
LightGBM/R-package/*

# key material
*.env
*.pem
*.pub
*.rdp
*_rsa
*
!LightGBM/lib_lightgbm.so
!LightGBM/LICENSE
!LightGBM/python-package
!LightGBM/VERSION.txt
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
AWS_REGION=us-east-1
DASK_VERSION=2021.9.1
BASE_IMAGE=lightgbm-dask-testing-base:${DASK_VERSION}
USER_SLUG=$$(echo $${USER} | tr '[:upper:]' '[:lower:]' | tr -cd '[a-zA-Z0-9]-')
CLUSTER_IMAGE_NAME=lightgbm-dask-testing-cluster-${USER_SLUG}
DASK_VERSION=2021.9.1
CLUSTER_IMAGE=${CLUSTER_IMAGE_NAME}:${DASK_VERSION}
FORCE_REBUILD=0
NOTEBOOK_IMAGE=lightgbm-dask-testing-notebook:${DASK_VERSION}
NOTEBOOK_CONTAINER_NAME=dask-lgb-notebook
Expand All @@ -22,14 +23,15 @@ base-image:

.PHONY: clean
clean:
git clean -d -f -X
rm -rf ./LightGBM/
docker rmi $$(docker images -q ${BASE_IMAGE}) || true
docker rmi $$(docker images -q ${CLUSTER_IMAGE}) || true
docker rmi $$(docker images -q ${NOTEBOOK_IMAGE}) || true

.PHONY: cluster-image
cluster-image: LightGBM/lib_lightgbm.so
docker build \
--build-arg DASK_VERSION=${DASK_VERSION} \
-t ${CLUSTER_IMAGE_NAME}:${DASK_VERSION} \
-t ${CLUSTER_IMAGE} \
-f Dockerfile-cluster \
.

Expand Down

0 comments on commit bdd717b

Please sign in to comment.