From 186e19613a2e3c1792aa3eb018b21f275203801a Mon Sep 17 00:00:00 2001 From: Daniel <daniel@harvey> Date: Wed, 24 Jul 2019 14:08:14 +0200 Subject: [PATCH] ENH: New tool for copying files into docker container. --- tools/copy_into_docker.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 tools/copy_into_docker.sh diff --git a/tools/copy_into_docker.sh b/tools/copy_into_docker.sh new file mode 100755 index 00000000..41c9dfb9 --- /dev/null +++ b/tools/copy_into_docker.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# ** header v3.0 +# This file is a part of the CaosDB Project. +# +# Copyright (C) 2019 IndiScale GmbH +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# ** end header + +# Copy files which are currently edited or debugged to the caosdb server docker container + +set -e + +# Copy just the publicly accessible files +core_dir="$(dirname $0)/../src/core" +container="compose_caosdb-server_1" +docker_webui_root="/opt/caosdb/git/caosdb-server/caosdb-webui" +docker_dir="${docker_webui_root}/src/core/" + +docker cp "${core_dir}/." "$container:$docker_dir" +docker exec -ti -w "$docker_webui_root" "$container" make -- GitLab