mounted_lists+=(-v ${array_list}:${container_list_volume}${array_list##*/})
done
- docker run -d \
- --name $container_name \
+ docker run --name $container_name \
-v ${volume_offline_directory}:${container_offline_volume} \
-v ${volume_repo_directory}:${container_repo_volume} \
"${mounted_lists[@]}" \
--rm \
--entrypoint="${container_offline_volume}docker-entrypoint.sh" \
- -it ${docker_image} \
+ ${docker_image} \
"${param_array[@]}"
- docker logs $(docker ps --filter name="^${container_name}$" --format '{{.ID}}' -a) -f
fi
#!/usr/bin/env bash
+set -eo pipefail
+
# Set distribution family
distro_type=$(cat /etc/*-release | grep -w "ID" | awk -F'=' '{ print $2 }' | tr -d '"')
case "$distro_type" in
}
# Getting input parameters
-POSITIONAL=()
if [[ $# -eq 0 ]] ; then
help # show help
exit 0
PCKG_LIST_DIR="/tmp/additional-lists/"
fi
+# Clean target repo dir for idempotency
+rm -rf ${OFFLINE_REPO_DIR}/*
+
case "$distro_type" in
ubuntu)
# Change current working dir