docker base and system images, and trigger docker test from travis.

This commit is contained in:
Olof Hagsand 2019-02-11 15:47:12 +01:00
parent 84d2efdedc
commit dc173e0b4c
14 changed files with 72 additions and 54 deletions

View file

@ -45,8 +45,8 @@ RUN apt-get update && apt-get install -y \
# Application-specific
RUN apt-get update && apt-get install -y nginx
# Test-specific
RUN apt-get update && apt-get install -y sudo curl procps # for test scripts
# Test-specific (for test scripts)
RUN apt-get update && apt-get install -y sudo curl procps time
# The example uses "clicon" group
RUN groupadd clicon

View file

@ -43,7 +43,7 @@ IMG = clixon/clixon-system
SHELL = /bin/sh
.PHONY: all clean depend install docker push clixon-system
.PHONY: all clean distclean docker test push depend install-include install uninstall
all:
echo "Run make docker to build docker image"
@ -61,6 +61,11 @@ distclean: clean
docker: clixon Dockerfile
sudo docker build -t $(IMG) . # --no-cache
# Start the clixon system container and run the test script
test: docker
./start.sh
sudo docker exec -it clixon-system bash -c 'cd /clixon/clixon/test; exec ./all.sh'
push:
depend:

View file

@ -48,3 +48,5 @@ To check status and then kill it:
$ sudo docker ps --all
$ ./cleanup.sh
```
You can also trigger the test scripts inside the container using `make test`.