forked from p15670423/monkey
Docker: Use rsync instead of timeout to exclude npm directories
This commit is contained in:
parent
4d50a9adee
commit
ba4a572237
|
@ -135,15 +135,20 @@ copy_entrypoint_to_build_dir() {
|
||||||
cp ./entrypoint.sh "$BUILD_DIR"
|
cp ./entrypoint.sh "$BUILD_DIR"
|
||||||
chmod 755 "$BUILD_DIR/entrypoint.sh"
|
chmod 755 "$BUILD_DIR/entrypoint.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
copy_monkey_island_to_build_dir() {
|
copy_monkey_island_to_build_dir() {
|
||||||
local src=$1
|
local src=$1
|
||||||
|
|
||||||
cp "$src"/__init__.py "$BUILD_DIR"
|
cp "$src"/__init__.py "$BUILD_DIR"
|
||||||
cp "$src"/monkey_island.py "$BUILD_DIR"
|
cp "$src"/monkey_island.py "$BUILD_DIR"
|
||||||
cp -r "$src"/common "$BUILD_DIR/"
|
cp -v -r "$src"/common "$BUILD_DIR/"
|
||||||
if ! timeout "${ISLAND_DIR_COPY_TIMEOUT}" cp -r "$src"/monkey_island "$BUILD_DIR/"; then
|
|
||||||
log_message "Copying island files takes too long. Maybe you're copying a dev folder instead of a fresh repository?"
|
rsync \
|
||||||
exit 1
|
-avr \
|
||||||
fi
|
--exclude=monkey_island/cc/ui/node_modules \
|
||||||
|
--exclude=monkey_island/cc/ui/.npm \
|
||||||
|
"$src"/monkey_island "$BUILD_DIR/"
|
||||||
|
|
||||||
cp ./server_config.json "$BUILD_DIR"/monkey_island/cc/
|
cp ./server_config.json "$BUILD_DIR"/monkey_island/cc/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue