Răsfoiți Sursa

Merge pull request #1 from kamailio/gv/review

Dockerfile: set ENTRYPOINT and default CMD, update README
Daniel-Constantin Mierla 7 ani în urmă
părinte
comite
f30e237f0a
2 a modificat fișierele cu 7 adăugiri și 22 ștergeri
  1. 5 21
      README.md
  2. 2 1
      docker/Dockerfile

+ 5 - 21
README.md

@@ -106,33 +106,17 @@ docker run kamailio-tests-deb9x
 
 With the default `Dockerfile`, the above command is running all unit tests.
 
-You can edit the `Dockerfile` and change the `CMD` line to execute a different command. Once
-you save the changes in the `Dockerfile`, rebuild the docker container and run.
+You can specify other options for `ktestsctl` by passing them to the Docker run command.
 
-For example, run the unit tests in non-silent mode, set `CMD` inside `Dockerfile` to:
-
-```
-CMD /usr/local/src/kamailio-tests/ktestsctl run
+For example, run the unit tests in non-silent mode:
 ```
-
-Save and then run:
-
-```
-docker build -t kamailio-tests-deb9x .
-docker run kamailio-tests-deb9x
+docker run kamailio-tests-deb9x run
 ```
 
-Example running only default `kamailio.cfg` related unit tests, update `Dockerfile` to have:
+Example running only default `kamailio.cfg` related unit tests:
 
 ```
-CMD /usr/local/src/kamailio-tests/ktestsctl run tcfgxx
-```
-
-Save and then run:
-
-```
-docker build -t kamailio-tests-deb9x .
-docker run kamailio-tests-deb9x
+docker run kamailio-tests-deb9x run tcfgxx
 ```
 
 If you run `ktestsctl` with `-w` option, you may need to stop the container using `docker` command:

+ 2 - 1
docker/Dockerfile

@@ -33,4 +33,5 @@ ENV DBROOTPW=ktestsrootpw
 COPY kamailio-tests /usr/local/src/kamailio-tests
 WORKDIR /usr/local/src/kamailio-tests
 
-CMD /usr/local/src/kamailio-tests/ktestsctl -m -q run
+ENTRYPOINT ["/usr/local/src/kamailio-tests/ktestsctl"]
+CMD ["-m", "-q", "run"]