git clone https://github.com/dyoder/jitter-test.git
cd jitter-test
docker build -t jitter .
This will take a few minutes the first time you do it. You'll get output along the lines of: Successfully built c0d40381300c
.
docker run -p 49000:1337 --name jitter -t jitter:latest
This will map port 49000
to the container's 1337
port.
- Test it out:
curl -XPUT localhost:49000/weather/santa-monica -d'70 degrees and sunny'
curl localhost:49000/weather/santa-monica
The result should read 70 degrees and sunny
.
To stop all running containers:
docker stop `docker ps -a -q`
To remove all containers:
docker rm -f `docker ps -a -q`