deepvats / local_build_docker_med.sh
misantamaria's picture
Tratando de arreglar los docker
36fc8c4
raw
history blame
514 Bytes
# Inicializa un array vacío
args=()
# Lee el archivo .env línea por línea
while IFS='=' read -r key value; do
if [[ $key != \#* && $key != '' ]]; then # Excluye comentarios y líneas vacías
args+=(--build-arg "$key=$value") # Agrega --build-arg y la variable como un elemento
fi
done < .env
echo "${args[@]}"
read -p "Press any key to continue..."
# Ejecuta docker build con los argumentos
IMAGE_NAME='dvats-rstudio-ghf:latest'
docker build "${args[@]}" . -f Dockerfile.med -t ${IMAGE_NAME}