Attention: My pull request was merged to the ECMWF SkinnyWMS repository at https://github.com/ecmwf/skinnywms, so now an official docker image ecmwf/skinnywms
is available on dockerhub!
Please use the official image!
docker run --rm -i -t -p 5000:5000 ecmwf/skinnywms
skinnywms packaged to run in a docker container with a simple demo application.
The pre-built image eduardrosert/skinnywms
is available on Dockerhub. If you already have Docker running on your machine, just do the following to run the image.
Run the demo applicaton and publish port 5000
. The --rm
switch makes sure that docker leaves no temporary files behind, when you stop the image:
docker run --rm -i -t -p 5000:5000 eduardrosert/skinnywms
Now you can type http://localhost:5000 on the machine running docker to access the demo application.
Run interactive shell /bin/bash
in docker image eduardrosert/skinnywms
or any other command for that matter overriding the default CMD instruction from the docker image:
docker run --rm -i -t -p 5000:5000 eduardrosert/skinnywms /bin/bash
Follow these steps to manually create the docker image and make it available locally.
#go to docker-skinnywms folder and run
make
#check if creation was successful
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
eduardrosert/skinnywms latest eb4953292e7f 1 minute ago 727MB
...
If you want use a local image and don't want to pull it from dockerhub, make sure you tag the image first, otherwise by default kubernetes will try to pull the most recent version from a public repo.
docker tag eduardrosert/skinnywms:latest eduardrosert/skinnywms:localOnly
Create deployment
kubectl create deployment skinnywms --image eduardrosert/skinnywms:localOnly
Check pod status
kubectl get pods
result should look something like this:
NAME READY STATUS RESTARTS AGE
skinnywms-756dffddd4-2xrgk 1/1 Running 0 18s
Expose deployment:
kubectl expose deployment skinnywms --type=LoadBalancer --port=5000
or if you are using a custom kubernetes cluster such as minikube or kubeadm
kubectl expose deployment skinnywms --type=NodePort --port=5000
List services
kubectl get service
you should see the service:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
skinnywms LoadBalancer 10.102.228.234 <pending> 5000:31508/TCP 10s
...
Make service accessable from outside
minikube service skinnywms
Get service url
minikube service skinnywms --url
example output:
http://192.168.99.101:31751
Access the demo application directly (starts a browser window)
minikube service skinnywms
In this example the GetCapabilities document should then be found at http://192.168.99.101:31751/wms/?request=GetCapabilities