summaryrefslogtreecommitdiffstats
path: root/build-dev-docker.sh
blob: 3a565f32680c84341a808ab813e4d58e2dc8099d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
##############################################################################
# Copyright (c) 2015 EMC and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

cd `dirname $0`

echo "Creating a docker image from the current working directory..."

cp docker/Dockerfile Dockerfile.dev
sed -i "s|COPY |COPY docker\/|" Dockerfile.dev
sed -i "s|ADD |ADD docker\/|" Dockerfile.dev
sed -i "s|RUN git clone.*https://gerrit.opnfv.org/gerrit/storperf.*$|COPY . \${repos_dir}/storperf|" Dockerfile.dev

diff docker/Dockerfile Dockerfile.dev

docker build -t opnfv/storperf:dev -f Dockerfile.dev .

rm -f Dockerfile.dev