forked from c-h-david/shbaam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker.test.yml
46 lines (39 loc) · 2.19 KB
/
docker.test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#*******************************************************************************
#docker.test.yml
#*******************************************************************************
#Purpose:
#Docker-compose can be used to build a Docker image from a Dockerfile and run
#the image in a Docker container using a specific command that performs a series
#of tests on the software included in the image. The purpose of this
#docker.test.yml file is to give instructions to docker-compose on how to do the
#work.
#Author:
#Cedric H. David, and Tony Tong, 2018-2018
#*******************************************************************************
#Usage
#*******************************************************************************
#docker-compose -f docker.test.yml up #Create image if it does not exist, and
#run it in a container w/ the command.
#Note: command has no impact on image.
#docker-compose -f docker.test.yml down #Remove the container, not the image.
#*******************************************************************************
#Test
#*******************************************************************************
sut:
build: .
#The name of the Docker image that is created will be shbaam_sut, this name
#is generated automatically based on the folder where docker-compose is run
#(shbaam) and the service name (sut, i.e. 'system under test')
command: bash -xc "echo machine urs.earthdata.nasa.gov login $NETRC_LOGIN_EDATA password $NETRC_PSWRD_EDATA >> ~/.netrc;"\
"cd ./tst/;"\
"./tst_pub_dwnl_David_etal_201x_SER.sh;"\
"./tst_pub_repr_David_etal_201x_SER.sh"
#bash -c (string) allows to make the code more readable here
#bash -x (verbose) allows to make the commands more readable at runtime
volumes:
- ./input:/home/shbaam/input
- ./output:/home/shbaam/output
#Volumes map the input & output folders in the local HD to the container
#*******************************************************************************
#End
#*******************************************************************************