Skip to content

Commit 2f0d93a

Browse files
author
Dilawar Singh
committed
Added docker-file for suse.
1 parent 82adc1c commit 2f0d93a

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.docker/opensuse/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM opensuse/leap
2+
MAINTAINER Dilawar Singh <[email protected]>
3+
4+
# Install dependencies.
5+
RUN zypper install -y git cmake gcc gcc-c++ make \
6+
python3 python3-devel python3-setuptools python3-numpy-devel \
7+
&& rm -rf /var/cache/zypp/packages/*
8+
RUN zypper install -y gsl-devel \
9+
&& rm -rf /var/cache/zypp/packages/*
10+
# These are required to run tests.
11+
RUN zypper install -y python3-matplotlib python3-networkx graphviz python3-scipy \
12+
&& rm -rf /var/cache/zypp/packages/*
13+
WORKDIR /home/root
14+
# RUN git clone https://github.com/dilawar/moose-core -b devel
15+
# Run docker build from outside
16+
COPY . moose-core
17+
RUN cd moose-core && python3 setup.py build test install
18+
CMD ["/usr/bin/python3", "-c", "'import moose;moose.test()'"]

.docker/opensuse/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
NAME:=dilawars/centos-moose
2+
VERSION:=$(shell date +%Y.%m.%d)
3+
4+
PROJECT_ROOT_DIR:=(PWD)/../..
5+
6+
all : build
7+
8+
build : Dockerfile
9+
cd ../../ && docker build -t $(NAME):$(VERSION) -f $(PWD)/Dockerfile .
10+
cd ../../ && docker build -t $(NAME):latest -f $(PWD)/Dockerfile .
11+
12+
upload :
13+
docker push $(NAME):$(VERSION)
14+
docker push $(NAME):latest
15+
16+
run :
17+
docker run $(NAME):$(VERSION) /bin/bash -c "python3 -c 'import moose; moose.test()'"
18+

0 commit comments

Comments
 (0)