3 # -------------------------------------------------------------------------
4 # Copyright (c) 2018 AT&T Intellectual Property
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # -------------------------------------------------------------------------
21 SCRIPTDIR=$(dirname $(readlink -f $0))
22 FUNC_TEST_DIR=$(dirname $SCRIPTDIR)
23 TEST_DIR=$(dirname $FUNC_TEST_DIR)
24 SIMULATORS_DIR=$FUNC_TEST_DIR/simulators
25 OSDF_DIR=$(dirname $TEST_DIR)
26 DOCKER_DIR=$SIMULATORS_DIR/tmp_docker
28 mkdir -p $DOCKER_DIR/sim/osdf/policy/response-payloads/pdp-has-vcpe-good
30 cp $SIMULATORS_DIR/Dockerfile $DOCKER_DIR/.
32 cp -r $OSDF_DIR/osdf $DOCKER_DIR/sim
33 mkdir -p $DOCKER_DIR/sim/config/
34 cp $SIMULATORS_DIR/simulated-config/*.yaml $DOCKER_DIR/sim/config/
35 cp $SIMULATORS_DIR/simulated-config/*.yml $DOCKER_DIR/sim/config/
36 cp $SIMULATORS_DIR/simulated-config/*.config $DOCKER_DIR/sim/config/
37 cp -r $SIMULATORS_DIR/configdb $DOCKER_DIR/sim
38 cp -r $SIMULATORS_DIR/has-api $DOCKER_DIR/sim
39 cp -r $SIMULATORS_DIR/policy $DOCKER_DIR/sim
40 cp $TEST_DIR/policy-local-files/*.json $DOCKER_DIR/sim/policy/response-payloads/pdp-has-vcpe-good
41 cp $TEST_DIR/placement-tests/policy_response.json $DOCKER_DIR/sim/policy/response-payloads/
42 cp $SIMULATORS_DIR/oof_dependencies_simulators.py $DOCKER_DIR/sim/oof_dependencies_simulators.py
43 cp $OSDF_DIR/requirements.txt $DOCKER_DIR
44 cp -r $SIMULATORS_DIR/start_sim.sh $DOCKER_DIR/
48 docker build -t osdf_sim .