Skip to content

Commit 4408bee

Browse files
committed
Docker build was successful. Needs to improve test function...
1 parent 892b9c3 commit 4408bee

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.docker/centos/Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ MAINTAINER Dilawar Singh <[email protected]>
55
RUN yum -y update && yum -y install epel-release && yum -y update \
66
&& yum -y clean all --enablerepo='*'
77
RUN yum install -y git cmake gcc gcc-c++ make \
8-
python3 python3-setuptools gsl-dev python3-numpy \
8+
python3 python3-devel python3-setuptools python3-numpy \
9+
&& yum -y clean all --enablerepo='*'
10+
RUN yum install -y gsl-devel \
11+
&& yum -y clean all --enablerepo='*'
12+
# These are required to run tests.
13+
RUN yum install -y python3-matplotlib python3-networkx graphviz python3-scipy \
914
&& yum -y clean all --enablerepo='*'
10-
1115
WORKDIR /home/root
1216
# RUN git clone https://github.com/dilawar/moose-core -b devel
1317
# Run docker build from outside
14-
COPY . /home/root/moose-core
15-
RUN cd moose-core && python3 setup.py build
18+
COPY . moose-core
19+
RUN cd moose-core && python3 setup.py build && python3 setup.py install
20+
RUN python3 -c 'import moose;moose.test()'

.docker/centos/Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
NAME:=dilawars/centos-moose
22
VERSION:=$(shell date +%Y.%m.%d)
33

4+
PROJECT_ROOT_DIR:=(PWD)/../..
5+
46
all : build
57

68
build : Dockerfile
7-
cd ../../ && docker build -t $(NAME):$(VERSION) .docker/centos
8-
cd ../../ && docker build -t $(NAME):latest .docker/centos
9+
cd ../../ && docker build -t $(NAME):$(VERSION) -f $(PWD)/Dockerfile .
10+
cd ../../ && docker build -t $(NAME):latest -f $(PWD)/Dockerfile .
911

1012
upload :
1113
docker push $(NAME):$(VERSION)
1214
docker push $(NAME):latest
1315

16+
run :
17+
docker run -ti $(NAME):$(VERSION) bash
18+

0 commit comments

Comments
 (0)